Plotting the Phase Portrait of a System of Nonlinear ODEs

9 ビュー (過去 30 日間)
Matthew Graham
Matthew Graham 2017 年 5 月 3 日
回答済み: Star Strider 2017 年 5 月 3 日
my first system of (nonlinear) ODEs is as follows:
x′=4x−x^3 and y′=y^2−3y
my second system of (nonlinear) ODEs is as follows:
x′=2x−xy and y′=x^3−(1/2)y
In class we sketched (by hand) the phase portrait for the second system of nonlinear ODEs by linearizaton via the Jacobian matrix. My professor told us to use a plotter to check our work (the hand-drawn phase portraits) but the one he linked to us won't work on my mac so I am trying to see the plots in Matlab but I don't know how to plot them and would be absolutely grateful for some help (I can write the code to solve them, I just don't know how to plot them is all). Thanks in advance!

回答 (1 件)

Star Strider
Star Strider 2017 年 5 月 3 日
In the documentation for odeset (link), see the section on 'OutputFcn' (link), specifically odephas2 and odephas3.
You could also do this manually and code it yourself, by first solving the differential equations, then giving the solution as the argument to your ODE function (without again calling ode45 or whatever solver you’re using) to get the derivatives.

カテゴリ

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