Re: [問題] 關於ODE45解二階常微已回收
※ 引述《mama1985le (Rush)》之銘言:
: 小弟不才
: 想請問板上各位鄉民
: 要如何用ODE45解以下方程式?
: y''(x)-4y'(x)+3y(x)=10exp(-2x)
: with conditions y(0)=1 and y'(9)=-3
: 感謝...
邊界值問題.
--------------------程式-----------------
function pttex139
clc
t = 0:9;
solinit = bvpinit(t,[1 -3]);
sol = bvp4c(@pttode,@pttodebc,solinit);
y = deval(sol,t);
plot(t,y(1,:));
function f = pttode(t,y)
f = zeros(2,1);
f(1) = y(2);
f(2) = 10.*exp(-2.*t)+4.*y(2)-3.*y(1);
function f = pttodebc(ya,yb)
f = zeros(2,1);
f(1) = ya(1) - 1;
f(2) = yb(1) + 3;
------------------------------------------
--
1.MATLAB programming 2.ASPEN process simulation package
3.FORTRN programming 4.Advance Engineering Mathematics
5.Process Control Theory
6.Chemical Engineering Basic Theory(Kinetic.thermodynamics.transport)
7.Numerical Method and Analysis
8.MATLAB Toolbox.Simulink system basic design
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 113.160.148.219
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):
MATLAB 近期熱門文章
PTT數位生活區 即時熱門文章