Plotting the Phase Portrait of a System of Nonlinear ODEs
11 次查看(过去 30 天)
显示 更早的评论
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!
0 个评论
回答(1 个)
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!