Creating Phase Plane graphs/portraits
13 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Steven Lord
on 12 Feb 2020
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 Comments
Steven Lord
on 12 Feb 2020
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.]
See Also
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!