
How do I plot the phase space for a system of 3 ODEs
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am new to matlab and need to plot a phase space for a system of three ODEs. My ODEs are Udot = aU(1-U/Q) - bUS, Sdot = -cS + dSU - jSO, and Odot = -kO + lOS. I have values for the parameters: a=180, b=60, c=120, d=30, j=120, k=30, l=15, Q=60, and want to plot the 3D phase space of this system of ODEs. Thank You.
0 commentaires
Réponses (1)
Ameer Hamza
le 19 Avr 2020
Modifié(e) : Ameer Hamza
le 21 Avr 2020
try this
a=180;
b=60;
c=120;
d=30;
j=120;
k=30;
l=15;
Q=60;
% Udot = aU(1-U/Q) - bUS
% Sdot = -cS + dSU - jSO
% Odot = -kO + lOS
dudt = @(u,s,o) a.*u.*(1-u/Q) - b.*u.*s;
dsdt = @(u,s,o) -c.*s + d.*s.*u - j.*s.*o;
dodt = @(u,s,o) -k.*o + l.*o.*s;
u = 0:0.1:1;
s = 0:2:20;
o = 0:3:30;
[U,S,O] = meshgrid(u,s,o);
dU = dudt(U,S,O);
dS = dsdt(U,S,O);
dO = dodt(U,S,O);
quiver3(U,S,O,dU,dS,dO);
axis tight

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!