1、内容简介
略
418-可以交流、咨询、答疑
2、内容说明
略
3、仿真分析
function dy = odefun(t,y)
lameda = 0.2;
alpha = 0.35;
beta = 15;
miu = 0.3;
theta = 0.05;
phi = 0.4;
dy = zeros(4,1); %
S = y(1);
E = y(2);
I = y(3);
R = y(4);
dy(1) = -lameda*beta*I*S-theta*beta*I*S;
dy(2) = lameda*beta*I*S-(alpha+phi)*E;
dy(3) = alpha*E-miu*I;
dy(4) = theta*beta*I*S+phi*E+miu*I;
end
%-----------------------------------------------------
% 清空所有变量
clear
% 清空屏幕
clc
close all
% 时间跨度取0-120,可以空格分隔,也可以用逗号分隔
tspan = [0,40];
% 初始值
S_0 = 0.9998;E_0 = 0; I_0 = 0.0002; R_0 = 0;
y0 = [S_0 E_0 I_0 R_0];
% 调用语句
[T1,Y1] = ode45( @odefun, tspan, y0);
% 绘图
figure
plot(T1,Y1(:,1))
xlabel 时间
ylabel S
title '\Lambda=0.2'
figure
plot(T1,Y1(:,2))
xlabel 时间
ylabel E
title '\Lambda=0.2'
figure
plot(T1,Y1(:,3))
xlabel 时间
ylabel I
title '\Lambda=0.2'
figure
plot(T1,Y1(:,4))
xlabel 时间
ylabel R
title '\Lambda=0.2'
4、参考论文
略