当前位置:网站首页>matlab ode45求解微分方程
matlab ode45求解微分方程
2022-07-22 21:45:00 【studyer_domi】
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、参考论文
略
边栏推荐
- yolov5 test. Py broken pipe error: [errno 32] broken pipe problem solving
- 实验三 LZW
- Interpretation of URL structure
- 如何配置CANoe Network-based access模式的以太网网络拓扑
- 弥散张量分析开源软件 DSI Studio 简体中文汉化版可以下载了
- 6-14漏洞利用-rpcbind漏洞利用
- Expérience II Yuv
- The Chinese and English dot matrix character display principle of the 111th blog of the fledgling Xiao Li
- 记一次线上SQL死锁事故:如何避免死锁?
- ProSci LAG3抗体:改善体外研究,助力癌症免疫治疗
猜你喜欢

scala idea提示函数参数

Worthington:来自酵母的己糖激酶的特性及其它参数说明

Graduation project ----- Internet of things environment detection system based on stm32

驱动页面性能优化的3个有效策略

开幕在即 | “万物互联,使能千行百业”2022开放原子全球开源峰会OpenAtom OpenHarmony分论坛

Worthington溶菌酶技术说明及文献参考

VMware virtual machine changes static IP and hostname, and uses xshell to connect

21 -- 除自身以外数组的乘积

Mysql A left(right) join B on A.id=B.id and A.age=1与A left(right) join B on A.id=B.id where A.age=1

Worthington哺乳动物乳酸脱氢酶研究——特点及测定方案
随机推荐
如何保护 JDBC 应用程序免受 SQL 注入
实验三 LZW
ProSci LAG3抗体:改善体外研究,助力癌症免疫治疗
局域网SDN技术硬核内幕 5 虚拟化网络的实现
使用Hystrix实现容错处理
我在京东使用工厂模式,一文说清楚工厂模式
【开发技术】SpingBoot数据库与持久化技术,JPA,MongoDB,Redis
Kubernetes 部署策略
squid代理服务+ip代理池
C voice realizes TCP client and TCP server, and QT call test
延伸联接边界,扩展业务范围,全面迈向智能云网2.0时代
Experiment III LZW
实验六 MPEG
pny 文件转图片
老板要我做一个 IP 属地功能,一个开源库搞定!
组蛋白研究丨Worthington小牛胸腺组蛋白的特征及文献参考
大厂底层必修:“应用程序与 AMS 的通讯实现”
6-14漏洞利用-rpcbind漏洞利用
[record of question brushing] 18. Sum of four numbers
程序员最想干的三件事 |漫画