system of 1st and 2nd order differential equations ode45

2 ビュー (過去 30 日間)
gorilla3
gorilla3 2017 年 10 月 16 日
編集済み: gorilla3 2017 年 10 月 24 日
I have a system of two 1st order diff eq and one 2nd order diff eq. I want to solve them simultaneously using ode45 and subsequently sum the solutions. I'm having troubles formulating the code for the 2nd order equation. Could you help? The code is:
Fx=@(t,xqxcxm)[ (-xqxcxm(1)+G_q .*(q-q_b)./q_b)./tau_q ;
(-xqxcxm(2) +0.3+3.*tanh(Pa_co2./Pa_co2_b -1.1))./tau_co2 ;
%insert 2nd order diff: xm'' = (-tau2* xm' -xm)/tau1^2 ]
[t, xqxcxm]=ode45(F,[0 100], [0 0 0]);
xq= xqxcxm(:,1);
xc= xqxcxm(:,2);
xm= xqxcxm(:,3);
x=xm+ xc -xq;
  2 件のコメント
Walter Roberson
Walter Roberson 2017 年 10 月 18 日
It is our policy that we do not remove questions with a relevant Answer, not unless the question was abusive.
gorilla3
gorilla3 2017 年 10 月 24 日
編集済み: gorilla3 2017 年 10 月 24 日
Could you please help me with this? It's still part of the question:

サインインしてコメントする。

回答 (1 件)

Josh Meyer
Josh Meyer 2017 年 10 月 16 日
The documentation explains how to express higher-order equations as first-order equations: Higher-Order ODEs
  1 件のコメント
gorilla3
gorilla3 2017 年 10 月 24 日
編集済み: gorilla3 2017 年 10 月 24 日
Hello,
here is a better definition of my question. Could you please help me? I believe I formulated one of the equations erroneously.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by