-
Notifications
You must be signed in to change notification settings - Fork 0
/
trajectory.m
executable file
·21 lines (20 loc) · 8.38 KB
/
trajectory.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
clear;clc
A=[0,75.44170497,88.49447551;0.1,91.64462704,85.29919187;0.2,107.1568965,78.79879379;0.3,121.2803881,69.6395476;0.4,131.6896549,58.48856658;0.5,139.5015148,44.56168106;0.6,138.4377809,30.4991006;0.7,128.6140449,17.53554911;0.8,108.8506986,8.62906569;0.9,77.13557702,7.585642652;1,36.35771233,16.50543428;1.1,-5.124476254,34.58728632;1.2,-41.46059074,59.52832198;1.3,-71.53025069,89.52199957;1.4,-93.68248344,121.503475;1.5,-103.4239942,150.5369008;1.6,-103.6714126,174.5235922;1.7,-95.09683502,190.7405926;1.8,-82.67014828,199.5141969;1.9,-66.39354866,200.571938;2,-50.43829932,196.4893676;2.1,-34.48650135,187.5180697;2.2,-20.612618,175.5683051;2.3,-9.364293339,161.1142571;2.4,-0.8715043277,145.3017436;2.5,4.484983379,128.364952;2.6,7.122631754,111.1345766;2.7,6.802925579,94.29307368;2.8,3.621566816,78.04924404;2.9,-2.088505795,62.89605708;3,-10.41093915,48.90772772;3.1,-20.740768,36.56324156;3.2,-33.24510757,26.42826647;3.3,-47.3819117,18.48683392;3.4,-62.64917045,13.21438499;3.5,-79.20502741,10.59059747;3.6,-95.71073146,11.19744568;3.7,-112.5026237,14.23233639;3.8,-128.6061426,20.35401231;3.9,-143.6944147,28.92463356;4,-155.5775949,40.34445577;4.1,-163.6312556,53.48611144;4.2,-165.4767831,66.37606646;4.3,-157.4468673,78.32356172;4.4,-137.5462513,86.49070739;4.5,-106.5306595,87.39444486;4.6,-68.54061162,78.43825157;4.7,-27.60856752,61.51412375;4.8,9.389623027,35.59997516;4.9,40.48531064,6.35195391;5,62.45140514,-24.57352062;5.1,73.45876503,-54.51166149;5.2,75.48554931,-77.59803765;5.3,69.38139875,-93.41408255;5.4,57.43349846,-101.4952549;5.5,42.47080801,-102.5037873;5.6,27.52528398,-96.90920047;5.7,12.59566258,-87.72924309;5.8,-0.4322730711,-75.50365443;5.9,-10.62954176,-60.65107113;6,-18.59528818,-44.6613029;6.1,-23.78209369,-27.84076856;6.2,-26.35436967,-10.58494225;6.3,-25.90499031,6.425794751;6.4,-22.75761564,22.62886898;6.5,-17.15593775,37.79820282;6.6,-9.042178789,51.61827096;6.7,1.434542838,63.70726974;6.8,13.68376129,73.98778316;6.9,27.50112187,81.71615095;7,42.40354565,87.33713229;7.1,57.82709337,90.2127864400000];
B=[0,-56.72157093,-82.08675264;0.1,-73.72157093,-87.08675264;0.2,-90.72157093,-88.08675264;0.3,-105.7215709,-83.08675264;0.4,-113.7215709,-67.08675264;0.5,-111.7215709,-44.08675264;0.6,-96.72157093,-14.08675264;0.7,-68.72157093,16.91324736;0.8,-29.72157093,46.91324736;0.9,15.27842907,69.91324736;1,60.27842907,81.91324736;1.1,102.2784291,87.91324736;1.2,135.2784291,81.91324736;1.3,157.2784291,67.91324736;1.4,168.2784291,53.91324736;1.5,168.2784291,37.91324736;1.6,161.2784291,23.91324736;1.7,147.2784291,10.91324736;1.8,130.2784291,1.913247362;1.9,112.2784291,-4.086752638;2,92.7670741,-6.583390399;2.1,73.41296482,-5.874749207;2.2,55.20215821,-2.107243575;2.3,38.16872732,4.211650305;2.4,22.87482303,12.99913431;2.5,9.630945198,23.97590757;2.6,-1.452643934,36.85007104;2.7,-9.8620604,51.0829263;2.8,-15.72705515,66.7969967;2.9,-18.74920009,82.98368182;3,-18.8273513,99.82257768;3.1,-16.11087631,116.1043972;3.2,-9.920646986,131.8659192;3.3,-1.727730977,146.0468852;3.4,10.22397318,159.8251468;3.5,23.6397821,170.7544037;3.6,39.34624476,179.798196;3.7,56.177702,184.9781377;3.8,72.74385903,184.7118039;3.9,86.29565524,177.9285512;4,93.16314156,161.9989918;4.1,91.1503599,137.9945516;4.2,75.30341244,106.9249881;4.3,46.50547897,73.86588139;4.4,7.285570736,43.93251604;4.5,-36.70795282,21.92153422;4.6,-81.76553447,8.950900731;4.7,-122.7777395,5.957765887;4.8,-155.721988,11.92671955;4.9,-178.5925973,23.93229603;5,-187.7502412,40.93863402;5.1,-187.6779141,57.91943598;5.2,-178.8395524,73.98734321;5.3,-165.0143585,87.08037357;5.4,-147.9191491,96.99724029;5.5,-129.7746292,102.9572253;5.6,-110.7708518,105.9903961;5.7,-91.76794313,105.6450025;5.8,-73.56425689,101.966586;5.9,-56.57066594,95.71052475;6,-41.25678952,86.84784587;6.1,-28.03620554,75.85836284;6.2,-16.97967258,62.97493496;6.3,-8.579799082,48.74284467;6.4,-2.716683226,33.00072188;6.5,0.3040405538,16.81959171;6.6,0.3759213149,-0.0582270907;6.7,-2.413762735,-16.71211069;6.8,-8.558529372,-32.9782737;6.9,-17.62961385,-48.12788021;7,-28.45653066,-62.71614654;7.1,-42.60102053,-74.8915708100000];
C=[0,-13.99904747,44.93967296;0.1,-26.84532255,33.96063889;0.2,-41.10816889,25.27877072;0.3,-56.90334288,19.16373934;0.4,-73.55157476,15.31229691;0.5,-90.89131072,14.14279458;0.6,-108.425514,15.99474432;0.7,-125.7674835,20.91936734;0.8,-141.5816677,28.11427544;0.9,-156.1148733,37.95313587;1,-167.5084641,50.03344995;1.1,-173.370099,62.91571471;1.2,-169.9372076,75.05073004;1.3,-156.6779429,84.0130433;1.4,-130.7342562,85.99665539;1.5,-93.15172197,77.94728887;1.6,-51.24901295,59.88310004;1.7,-7.816996279,31.98251334;1.8,27.94917995,-1.090059505;1.9,55.87930215,-37.08362364;2,72.1706147,-71.02628094;2.1,77.06140895,-99.0516382;2.2,73.40406244,-118.9534305;2.3,60.06403896,-128.0779322;2.4,44.35197931,-129.0039536;2.5,27.82534494,-123.086978;2.6,11.95242443,-112.0196877;2.7,-2.843324316,-97.04175806;2.8,-14.64992537,-80.0342907;2.9,-23.31472099,-62.03626897;3,-29.13642463,-43.09335298;3.1,-32.04248362,-24.28120067;3.2,-32.00361493,-6.104733072;3.3,-29.02679758,11.18537285;3.4,-23.28811848,27.45419943;3.5,-15.01942064,42.1848212;3.6,-4.399037064,55.05586133;3.7,8.183577502,65.96803826;3.8,22.7942373,74.71269402;3.9,38.42069522,80.53750864;4,54.97698104,83.26463023;4.1,72.05494432,83.03194924;4.2,89.18846032,79.95308628;4.3,105.7231831,73.88746396;4.4,121.4205542,64.98585247;4.5,135.3675005,53.02070824;4.6,145.2304514,38.94327857;4.7,150.5099754,22.91189928;4.8,146.2132634,7.953889923;4.9,131.1866828,-4.039958842;5,104.012362,-9.059510543;5.1,65.05500391,-3.06734132;5.2,21.84319915,13.8964328;5.3,-20.32152135,40.91793584;5.4,-56.11475716,74.96017891;5.5,-84.80024394,112.9756096;5.6,-100.0853556,148.9155756;5.7,-104.8644746,179.9577366;5.8,-98.37263456,201.8825165;5.9,-85.90835828,214.9333036;6,-68.00767999,217.956516;6.1,-49.87693291,214.0214159;6.2,-32.96551293,204.9505665;6.3,-17.91884802,191.9769216;6.4,-5.824354571,176.8585414;6.5,3.773139824,159.7926932;6.6,10.03770383,141.9655697;6.7,13.07496723,123.851181;6.8,13.04287269,105.8276921;6.9,10.06697646,88.4967539;7,4.400246577,72.25698837;7.1,-3.969974076,57.5964745500000];
D=[0,-17.24715673,77.6819251;0.1,-11.39265393,62.94030723;0.2,-8.272793251,47.70748539;0.3,-8.024497415,32.37150797;0.4,-10.26781699,16.86035664;0.5,-15.2614346,2.438454597;0.6,-22.71153359,-11.19979401;0.7,-32.90359225,-23.2064735;0.8,-45.25266929,-33.48671235;0.9,-59.07940823,-41.53710497;1,-74.17501074,-47.12054774;1.1,-89.90781193,-49.91613717;1.2,-105.2502324,-49.39330684;1.3,-118.3585898,-44.87177173;1.4,-127.2384539,-35.3454904;1.5,-128.2868167,-21.17202735;1.6,-118.9852719,-2.646962805;1.7,-97.50128112,15.79355662;1.8,-66.20046875,34.02418872;1.9,-28.13937228,46.69628622;2,12.73082031,51.93373089;2.1,51.75206591,50.64920226;2.2,85.81146076,42.85919943;2.3,112.0176993,30.42175626;2.4,128.7338802,14.79779077;2.5,134.9586348,-0.2533172629;2.6,132.7415169,-13.83926069;2.7,123.7126653,-24.27595499;2.8,110.2588776,-31.1159379;2.9,94.68738857,-34.21674783;3,77.90374445,-33.92577255;3.1,61.42471951,-30.53623905;3.2,45.75286035,-24.42509691;3.3,31.29335685,-16.06352979;3.4,18.60270004,-5.42743451;3.5,7.837490537,6.808505088;3.6,-0.3952356397,20.52776791;3.7,-6.219659013,35.09674775;3.8,-9.310381677,50.28009893;3.9,-9.666502663,65.76412552;4,-7.363524893,81.01956101;4.1,-2.410749618,95.65888893;4.2,4.596252504,109.0445862;4.3,13.75365226,120.7798032;4.4,24.77076453,130.7673232;4.5,37.354493,138.4508476;4.6,51.1989737,144.1131432;4.7,64.88840652,146.6121645;4.8,78.76742723,144.9702019;4.9,89.78289444,139.8327236;5,96.80744737,129.02224;5.1,95.65710137,113.7130359;5.2,83.60451255,95.30081705;5.3,60.66334908,75.44925012;5.4,28.72858277,56.75782416;5.5,-10.28622129,44.63932909;5.6,-50.33874989,38.61093159;5.7,-89.05046902,41.14243304;5.8,-122.2494722,49.60752222;5.9,-146.1928383,61.89945478;6,-161.2890393,78.49537394;6.1,-165.1864381,93.92802576;6.2,-161.2053016,108.6635275;6.3,-150.1878573,119.6466405;6.4,-134.8532336,126.8722132;6.5,-117.2769912,130.0590625;6.6,-99.44196449,130.3585781;6.7,-81.73257037,127.4903542;6.8,-65.06370461,121.6938278;6.9,-50.05562241,113.4840357;7,-37.08743838,102.8681522;7.1,-26.30426522,90.6328755000000];
figure;hold on;
var={'A' 'B' 'C' 'D'};
color={'r' 'b' 'g' 'y'};
for i=1:4
S=eval(var{i});
T=S(:,1);
X=S(:,2);
Y=S(:,3);
T_new=linspace(T(1),T(end),300);
X_new=interp1(T,X,T_new,'pchip');
Y_new=interp1(T,Y,T_new,'pchip');
plot(X_new,Y_new,color{i},'LineWidth',5);
end
axis equal
grid on