您好,欢迎访问三七文档
当前位置:首页 > 医学/心理学 > 病毒学 > 传染病模型SI、SIS、SIR
标准实用文案大全SI模型利用MATLAB求解传染病模型中的SI模型的解析解:程序中a即λ,y即iy=dsolve('Dy=a*(y-y^2)','y(0)=y0')y=1/(1-exp(-a*t)*(-1+y0)/y0)画图:SI模型的i~t曲线设λ=1,i(0)=0.1y=dsolve('Dy=y-y^2','y(0)=0.1')y=1/(1+9*exp(-t))x=0:0.01:13;y=1./(1+9.*exp(-x));plot(x,y)title('SI模型的i~t曲线');xlabel('t');ylabel('i');axis([01301.1]);标准实用文案大全画图:SI模型的di/dt~i曲线程序中x即i,y即di/dt,λ=1x=0:0.01:1;y=x-x.*x;plot(x,y)title('SI模型的di/dt~i曲线');xlabel('i');ylabel('di/dt');标准实用文案大全SIS模型利用MATLAB求解传染病模型中的SIS模型的解析解:程序中a即λ,b即μ,y即iy=dsolve('Dy=a*(y-y^2)-b*y','y(0)=y0')y=(a-b)/(a-exp(-(a-b)*t)*(-a+b+y0*a)/y0/(a-b)*a+exp(-(a-b)*t)*(-a+b+y0*a)/y0/(a-b)*b)画图:SIS模型的di/dt~i曲线(δ1)程序中x即i,y即di/dt,λ=1,μ=0.3x=0:0.01:1;y=0.7.*x-x.^2;plot(x,y)title('SIS模型的di/dt~i曲线');xlabel('i');ylabel('di/dt');标准实用文案大全画图:SIS模型的i~t曲线(δ1)设λ=1,μ=0.3,i(0)=0.02y=dsolve('Dy=0.7*y-y^2','y(0)=0.02')y=7/(10+340*exp(-7/10*t))x=0:1:16;y=7./(10+340.*exp(-7./10.*x));plot(x,y)title('SIS模型的i~t曲线');xlabel('t');ylabel('i');标准实用文案大全画图:SIS模型的di/dt~i曲线(δ≤1)程序中x即i,y即di/dt,λ=0.5,μ=0.6x=0:0.01:1;y=-0.5.*x.^2-0.1.*x;plot(x,y)title('SIS模型的di/dt~i曲线');xlabel('i');ylabel('di/dt');标准实用文案大全画图:SIS模型的i~t曲线(δ≤1)设λ=0.5,μ=0.6,i(0)=0.02y=dsolve('Dy=-0.5*y^2-0.1*y','y(0)=0.02')y=1/(-5+55*exp(1/10*t))x=0:1:40;y=1./(-5+55.*exp(1./10.*x));plot(x,y)title('SIS模型的i~t曲线');xlabel('t');ylabel('i');标准实用文案大全SIR模型利用MATLAB求解传染病模型中的SIR模型的数值解:程序中a=λ=1,b=μ=0.3,i(0)=0.02,s(0)=0.98M文件中:functiony=ill(t,x)a=1;b=0.3;y=[a*x(1)*x(2)-b*x(1),-a*x(1)*x(2)]';命令窗口中:[t,x]=ode45('ill',[0:50],[0.02,0.98]);[t,x]ans=00.02000.98001.00000.03900.95252.00000.07320.90193.00000.12850.81694.00000.20330.69275.00000.27950.54386.00000.33120.39957.00000.34440.28398.00000.32470.20279.00000.28630.149310.00000.24180.114511.00000.19860.091712.00000.15990.076713.00000.12720.066514.00000.10040.059315.00000.07870.054316.00000.06140.050717.00000.04780.048018.00000.03710.046019.00000.02870.044520.00000.02230.043421.00000.01720.042622.00000.01330.041923.00000.01030.041524.00000.00790.041125.00000.00610.040826.00000.00470.040627.00000.00360.040428.00000.00280.040329.00000.00220.040230.00000.00170.0401标准实用文案大全31.00000.00130.040032.00000.00100.040033.00000.00080.040034.00000.00060.039935.00000.00050.039936.00000.00040.039937.00000.00030.039938.00000.00020.039939.00000.00020.039940.00000.00010.039941.00000.00010.039942.00000.00010.039943.00000.00010.039944.00000.00000.039845.00000.00000.039846.00000.00000.039847.00000.00000.039848.00000.00000.039849.00000.00000.039850.00000.00000.0398plot(t,x(:,1),t,x(:,2)),grid,pausei(t),s(t)图形如下:标准实用文案大全plot(x(:,2),x(:,1)),grid,pausei~s图形(相轨线)如下:标准实用文案大全画图:SIR模型的相轨线程序中y即i,x即s,λ=1,μ=0.3①s(0)=0.32;②s(0)=0.58;③s(0)=0.73;④s(0)=0.85x=0:0.01:1;y=1-x;y1=1-x+0.3.*(log(x)-log(0.32));y2=1-x+0.3.*(log(x)-log(0.58));y3=1-x+0.3.*(log(x)-log(0.73));y4=1-x+0.3.*(log(x)-log(0.85));plot(x,y,x,y1,x,y2,x,y3,x,y4)axis([0101]);title('SIR模型的i~s曲线');xlabel('s');ylabel('i');
本文标题:传染病模型SI、SIS、SIR
链接地址:https://www.777doc.com/doc-7075996 .html