SOLVING SYSTEM OF ODEs
6 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I have this system of differential equations:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1376714/image.jpeg)
where these two are being differentiated respect an adimensional time defined as:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1376719/image.jpeg)
also all other variables are defined as:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1376724/image.jpeg)
but I also have a third differential equation which is:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1376729/image.jpeg)
Is there any way of solving these equations in the same ODE45 solver? Later I want to couple this system with another two ODEs that are going to be diferrentiated respect to 't' and I need to solve all of them together.
Thanks in advance.
4 件のコメント
回答 (1 件)
Torsten
2023 年 5 月 8 日
編集済み: Torsten
2023 年 5 月 8 日
Write your three equations in the same independent variable (thus either t or tau).
I assume all three equations are written in t.
Then your call to ODE45 would be
tspan = [tstart tend]
y0 = [Tf0;Tc0;T0];
dTf_dt = @(t,y)...
dTc_dt = @(t,y)...
dT_dt = @(t,y)...
fun = @(t,y)[dTf_dt(t,y);dTc_dt(t,y);dT_dt(t,y)];
[Time,Y] = ode45(fun,tspan,y0)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!