Steady states of graph
4 views (last 30 days)
Show older comments
I have produced numerical solutions for my system of ODE's in Matlab, and now I need to find their steady states which I can't figure out how to do.
My script is:
% DIFFERENTIAL EQUATION SYSTEM:
% dS/dt=μ-λSI-μS
% dI/dt=λSI-βI-μI
% dR/dt=βI-μR
% MAPPING: S = y(1), I = y(2), R = y(3)
SIR = @(t,y,mu,lam,b) [mu-(lam.*y(2)-mu).*y(1); (lam*y(1)-b-mu).*y(2); b*y(2)-mu*y(3)];
mu = 3; % mu
lam = 0.1; % lambda
b = 0.1; % beta
y0 = [2000; 0; 0];
tspan = linspace(0, 1, 100);
[T,Y] = ode45(@(t,y) SIR(t,y,mu,lam,b), tspan, y0);
figure(1)
plot(T, Y)
grid
legend('S(t)', 'I(t)', 'R(t)', 'Location', 'NW')
Could anyone tell me how to find the steady states/equlibrium points of my graph? I have tried right-clicking the graph but nothing comes up when I do. I am using Matlab R2011a.
Thanks :)
0 Comments
Answers (1)
Star Strider
on 11 Apr 2015
I forgot to look at your initial conditions. With them, ‘S’ quickly goes to infinity, and the other two remain at zero.
0 Comments
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!