
How do I plot the phase space for a system of 3 ODEs
조회 수: 6 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Ameer Hamza
2020년 4월 19일
편집: Ameer Hamza
2020년 4월 21일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!