资源简介
基于MATLAB的SIR模型代码,模型完备,建立了传染病模型的SI SIR SIS 模型,包含代码过程及matlab截图
代码片段和文件信息
function [tSIR] = differentialSIR(NbetagammaMaxTime)
%
%
%
% RISK_STRUCTURE( beta gamma S0 I0 MaxTime)
% This is the MATLAB version of program 2.1 from page 19 of
% “Modeling Infectious Disease in humans and animals“
% by Keeling & Rohani.
%
% It is the simple SIR epidemic without births or deaths.%
%
% Sets up default parameters if necessary.
I0 = 100 / N;
S0 = 1 - I0;
% Checks all the parameters are valid
if S0<=0
error(‘Initial level of susceptibles (%g) is less than or equal to zero‘S0);
end
if I0<=0
error(‘Initial level of infecteds (%g) is less than or equal to zero‘I0);
end
if beta<=0
error(‘Transmission rate beta (%g) is less than or equal to zero‘beta);
end
if gamma<=0
error(‘Recovery rate gamma (%g) is less than or equal to zero
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 12292 2016-01-22 19:37 YBJAN1916_SIR model in whole population\.DS_Store
目录 0 2020-01-30 10:08 YBJAN1916_SIR model in whole population\SIR\
文件 1295 2016-01-22 19:38 YBJAN1916_SIR model in whole population\SIR\SIR.m
文件 1536 2016-01-19 02:31 YBJAN1916_SIR model in whole population\SIR\differentialSIR.m
文件 2361 2016-01-19 02:40 YBJAN1916_SIR model in whole population\SIR\discreteSIR.m
文件 910 2016-01-19 02:40 YBJAN1916_SIR model in whole population\SIR\mean_fieldSIR.m
目录 0 2020-01-30 10:08 YBJAN1916_SIR model in whole population\
- 上一篇:基于ESPRIT的DOA估计
- 下一篇:bp神经网络的MATLAB实现
评论
共有 条评论