Hi,
I need to plot different orbits in one figure.
The coordinate vectors are result of a Runge-Kutta 7-8 so I can't know if the number of elements from each orbit coordinates are the same (maybe one has 2000 points and another 2500 or so.
When I try to plot them all together, the result is that I get only the last figure.
My code is:
C=C1;[ resu1 ] = nInt( fun , ab , tspan, titol, rotulacio,C );C=C2;[ resu2 ] = nInt( fun , ab , tspan, titol, rotulacio,C );C=C3;[ resu3 ] = nInt( fun , ab , tspan, titol, rotulacio,C );rD1=resu1(2,:)./d;rpD1=resu1(4,:)./d;rD2=resu2(2,:)./d;rpD2=resu2(4,:)./d;rD3=resu3(2,:)./d;rpD3=resu3(4,:)./d;plot (rD1,rpD1,rD2,rpD2,rD3,rpD3)title('rp/d vs r/d');xlabel('r/d');ylabel('rp/d');
I just get rD3 vs rpD3. Where is my mistake?
Thanks.
Best Answer