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.

回答(1 个)

Steven Lord
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 个评论
Ross Macaroni
Ross Macaroni 2020-2-12
Thank you for your reply. I am relatively new to MATLAB and am not familiar with odeset. I read the help about it but am still unsure how to code the graphs.
Steven Lord
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 CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by