Plotting the Phase Portrait of a System of Nonlinear ODEs
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Star Strider
le 3 Mai 2017
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 commentaires
Voir également
Catégories
En savoir plus sur Ordinary Differential Equations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!