[英]How can I find numerical solutions of discrete SIR model in MATLAB?
I was looking to simulate the discrete sir model in MATLAB and also to find stability and bifurcation graph.我正在寻找模拟 MATLAB 中的离散先生 model 并找到稳定性和分岔图。 can anyone help me solve these problems?
谁能帮我解决这些问题?
A great source for Matlab scripts is the Mathworks file exchange. Matlab 脚本的一个重要来源是 Mathworks 文件交换。 A search for the SIR model found:
搜索 SIR model 发现:
https://www.mathworks.com/matlabcentral/fileexchange/75100-sir-epidemic-spread-model?s_tid=srchtitle https://www.mathworks.com/matlabcentral/fileexchange/75100-sir-epidemic-spread-model?s_tid=srchtitle
This should have what you're looking for (unfortunately don't have Matlab on this computer to check).这应该有你要找的东西(不幸的是,这台电脑上没有 Matlab 可以检查)。
For the discrete sir equations a for loop as described in:对于离散 sir 方程,for 循环如下所述:
https://www.mathworks.com/matlabcentral/answers/325773-solving-difference-equation-with-its-initial-conditions https://www.mathworks.com/matlabcentral/answers/325773-solving-difference-equation-with-its-initial-conditions
should be able to solve your system for fixed parameters.应该能够解决您的系统的固定参数。 You're going have to do a bit of work to get the bifurcation diagram and stability.
您将不得不做一些工作来获得分岔图和稳定性。 This answer:
这个答案:
Generate bifurcation diagram for 2D system 生成二维系统的分岔图
should get you going.应该让你去。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.