Creating Phase Plane graphs/portraits
10 次查看(过去 30 天)
显示 更早的评论
I want to create some phase plane graphs using the equations:
dx/dt = (x^2)y-ax, dy/dt = b-(x^2)y-y
for various values of the constants a and b, with a,b>0.
I have calculated the Jacobian and know there's fixed points at (0,b),(1,a), etc... but unsure how to plot graphs showing this.
0 个评论
回答(1 个)
Steven Lord
2020-2-12
Use odeset to create options to pass into one of the ODE solvers in MATLAB. In your odeset call set the 'OutputFcn' option to @odephas2. Then pass those options into one of the ODE solvers in MATLAB (like ode45.)
You can use the orbitode example as a model, as it uses odephas2 to plot the orbits of the bodies.
2 个评论
Steven Lord
2020-2-12
Run the orbitode example. See if the plot that it creates looks similar to what you want. If it does, edit the orbitode example (taking care not to modify it!) and read through it to see how it uses odeset and the ODE solver to create the plot. Use that as a model for your own function that does that same thing for your equations. [Copy and paste the appropriate pieces into a new file then modify it to solve your system of ODEs.]
另请参阅
类别
在 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!