• 大小: 81KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-28
  • 语言: 其他
  • 标签: MATLAB  

资源简介

用元胞自动机实现的简单的病毒传播模型,考虑了病毒感染概率和发病概率,包括潜伏期与发病期。可以简单模拟病毒的发病过程,可供初学者参考。(小白向,大佬就不要下载了)

资源截图

代码片段和文件信息

function [peopleg] = nextstage(peoplegPPdnkTl)
%外圈不算(计算简便)
Pe=zeros(nn);                % t时刻(i j)处的人为潜伏状态时 其转为SARS 患者的概率.
for i=2:n-1
    for j=2:n-1
        %计算Pe
        if(g(ij)<=12)
            Pe(ij)=exp(-k*(12-g(ij))./g(ij));
        else
            Pe(ij)=1;
        end
        %计算people,g
        if(people(ij)==0)
            if(P(ij)>Pd(ij))
                people(ij)=1;g(ij)=1;
            else
                people(ij)=0;g(ij)=0;
            end
        elseif(people(ij)==1)
            g(ij)=g(ij)+1;
            people(ij)=1+1*(rand        elseif(people(ij)==2)
            if(g(ij)                people(ij)=2;g(ij)=g(ij)+1;
            else
                people(ij)=3;g(ij)=0;
            end
        else
            people(ij)=3;g(ij)=0;
        end
    end
end

end

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        112  2020-02-01 20:26  Virus Spread Model\debug\debug1.m

     文件      92849  2020-02-01 20:32  Virus Spread Model\debug\debug1.png

     文件       1856  2020-02-01 23:09  Virus Spread Model\debug\debug2.m

     文件        913  2020-02-01 22:39  Virus Spread Model\nextstage.m

     文件       3193  2020-02-01 23:19  Virus Spread Model\spread.m

     文件         20  2020-02-01 22:42  Virus Spread Model\直接运行spread即可.txt

     目录          0  2020-02-01 23:18  Virus Spread Model\debug

     目录          0  2020-02-01 23:19  Virus Spread Model

----------- ---------  ---------- -----  ----

                98943                    8


评论

共有 条评论