MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [讨论]怎样在matlab中用四阶Runge-kutta法求解四阶常微分方程 (https://www.labfans.com/bbs/showthread.php?t=4078)

kornberg 2008-08-05 16:07

[讨论]怎样在matlab中用四阶Runge-kutta法求解四阶常微分方程
 
怎样在matlab中用四阶Runge-kutta法求解四阶常微分方程

一般四阶Runge-kutta法例子都是用求解一阶常微分方程

那么对于四阶常微分方程,该怎么处理那??

hobby_gz 2008-08-07 09:35

回复: [讨论]怎样在matlab中用四阶Runge-kutta法求解四阶常微分方程
 
微分方程组

smiles860710 2009-03-17 09:19

回复: [讨论]怎样在matlab中用四阶Runge-kutta法求解四阶常微分方程
 
以二阶微分方程为例
y1''-(1-y1^2)*y1'+y1=0
降阶令y2=y1'
y2'=(1-y1^2)*y2-y1
M文件
function dydx=vdp1(x,y)

dydx=[y(2);(1-y(1)^2)*y(2)-y(1)];

end在命令窗口输入[x,y]=ode45(@vdp1,[0 20],[20,5])就可得到结果


所有时间均为北京时间。现在的时间是 03:04

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.