88608 שימושים מודרניים במתמטיקה - פרופ' ג'רמי שיף

The SIR model

S' = - beta I S + gamma R
I' = beta I S - nu I
R' = nu I - gamma R

N = 10
gamma = 0.4
nu = 1.2
beta = 0.04, 0.1, 0.15, 0.4

Matlab code:

 
N = 10; 
gamma = 0.4;
nu = 1.2; 
beta = 0.4; 

figure(1)
hold on

for n=0:10 
   [t,x]=ode45(@(t,x) [-beta*x(1)*x(2)+gamma*(N-x(1)-x(2)); x(2)*(beta*x(1)-nu)],[0,40],[n;10-n]);
   plot(x(:,1),x(:,2)) 
end

x=0:0.01:10;
plot(x,10-x,'r')
xlabel('S')
ylabel('I')
title('beta=0.4')
axis([0,10,0,10])

Solutions for different values of beta: