How to plot different length vectors
이전 댓글 표시
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.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Red에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
