필터 지우기
필터 지우기

How to plot ODE solution after a certain time?

조회 수: 2 (최근 30일)
Sam  Hayes
Sam Hayes 2015년 11월 22일
답변: Are Mjaavatten 2016년 1월 12일
Hi,
I'm plotting phase portraits for the Lorenz system and I'm wondering if I can plot after a certain time t so I'm only plotting a limit cycle and none of the transient behaviour before hand.
I know I can change my x,y and z limits with xlim ([ ]) etc but this doesn't seem to work if I try tlim.
Any suggestions?
Thanks

답변 (1개)

Are Mjaavatten
Are Mjaavatten 2016년 1월 12일
Let us use the Matlab code on the Wikipedia Lorenz system page as an example:
https://en.wikipedia.org/wiki/Lorenz_system
Running this code gives you a vector t and a result matrix a. You can plot a for times greater than 50 only, by:
iplot = find(t>50);
plot3(a(iplot,1),a(iplot,2),a(iplot,3));grid on
To see how the curve develops, you may also try comet3:
comet3(a(:,1),a(:,2),a(:,3))

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by