ODE system phase plane
Mostrar comentarios más antiguos
Hi guys, I have never plotted phase planes in Matlab and would like to include some graphics on a due coursework.
My ODE systems are:
dx/dt=x(r-ay)
dy/dt=c+y(bx-d)
where r,a,c,b,d are all positive constants.
I would like for the plot to include trajectories and a direction field.
Any ideas on how I could do this?
1 comentario
darova
el 20 de Abr. de 2020
Did you solve your equations already?
Respuestas (3)
Ameer Hamza
el 20 de Abr. de 2020
0 votos
Check my answer here to draw 2D phase plot: https://www.mathworks.com/matlabcentral/answers/519014-how-does-one-plot-phase-portraits-for-systems-of-differential-equations and here for 3D phase plot: https://www.mathworks.com/matlabcentral/answers/519154-how-do-i-plot-the-phase-space-for-a-system-of-3-odes. Also check here for more information: http://matlab.cheme.cmu.edu/2011/08/09/phase-portraits-of-a-system-of-odes/
2 comentarios
Martin Moreno
el 20 de Abr. de 2020
Ameer Hamza
el 21 de Abr. de 2020
Martin, can you show the code which cause this error?
Steven Lord
el 20 de Abr. de 2020
0 votos
Create an options structure using odeset. In your odeset call specify the OutputFcn option to be @odephas2, a function included with MATLAB for creating a 2-dimensional phase plane plot. Pass the options structure returned by odeset into the ODE solver as the appropriate input argument.
The orbitode example uses odephas2 in its execution.
Brian Hong
el 26 de En. de 2022
Editada: Brian Hong
el 26 de En. de 2022
0 votos
Categorías
Más información sobre Ordinary Differential Equations en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!