フィルターのクリア

Plotting phase plane from system of second order ODEs

1 回表示 (過去 30 日間)
María Jesús
María Jesús 2015 年 10 月 14 日
コメント済み: Star Strider 2015 年 10 月 14 日
Hi,
I'm using ode45 to solve a system of two second order ODEs (writing it as a system of 4 first order ODEs)
du(1) = u(3); %u'
du(2) = u(4); %v'
du(3) = c*u(3) - (1 - u(1) - a1*u(2))*u(1); %u
du(4) = (c/d)*u(4) - (r/d)*(1- a1*u(1) - u(2))*u(2); %v
I would like to plot a phase plane portrait of two of these (du(1) and du(2)). Is there a way to do this?
Thanks!!

採用された回答

Star Strider
Star Strider 2015 年 10 月 14 日
See the odeset documentation for Description of Solver Output Properties, particularly for ‘OutputFcn’ and the odephas2 option. That’s the easiest way.
  2 件のコメント
María Jesús
María Jesús 2015 年 10 月 14 日
Thanks! How about getting direction arrows as well?
Star Strider
Star Strider 2015 年 10 月 14 日
My pleasure!
For arrows, you will need to use the quiver or quiver3 plot functions. Use the hold function to overplot the arrows on the phase plot.
Sorry for the delay — MATLAB Answers is apparently undergoing some sort of upgrade just now and I didn’t see your reply. It would normally pop to the top of the stack, but didn’t.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by