MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   使用Matlab解决ODE (https://www.labfans.com/bbs/showthread.php?t=23895)

poster 2019-12-10 20:48

使用Matlab解决ODE
 
我有以下ODE:

b'(t) + k16*b(t) = k15*a(t) 其中k15和k16是常数。

关于如何解决的任何想法?

谢谢!阿米特



[B]回答:[/B]

那是一阶ODE。有一个分析解决方案(只需使用一个积分因子)。无需集成。 [URL]http://www.math.hmc.edu/calculus/tutorials/odes/[/URL]

但是,如果要在MATLAB中解决它:

>> k15 = 0.2; k16 = 0.3; % type your constants here >> a = @(t) t^2; % type your expression for a here >> dbdt = @(t,b) -k16*b + k15*a(t); >> tf = 10; % final time of integration >> b0 = 1; % initial value of b >> [t,y] = ode45(@dbdt,[0 tf],b0) >> plot(t,y) % display solution.

[url=https://stackoverflow.com/questions/3691692]更多&回答...[/url]


所有时间均为北京时间。现在的时间是 23:21

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