Solving a Differential Equation Numerically

3 ビュー (過去 30 日間)
Aditya Goel
Aditya Goel 2021 年 7 月 1 日
コメント済み: Aditya Goel 2021 年 7 月 18 日
I have the following differential equation:
pch4=@(x,w)a*(1-x)*((1-(alpha*w))^0.5);
ph2O=@(x,w)a*(b-x)*((1-(alpha*w))^0.5);
pO2=@(x,w)a*(c-x)*((1-(alpha*w))^0.5);
ra1=@(x,w)(k1.*k2.*pch4(x,w).*pO2(x,w)./((k1.*pO2(x,w)*(1+(Kp.*ph2O(x,w))))+(2.*k2.*pch4(x,w))+(k1.*k2.*pch4(x,w).*pO2(x,w)./k3)))
ode= diff(x,w)==-ra1(x,w)/F;
where, a,b,c k1,k2,k3,Kp, F are known parameters.
I was wondering how to solve it numerically, since I get the following error while using ode45:
Mixture of single and double data for 't0', 'y0', and 'f(t0,y0)' in call to
ode45.
> In odearguments (line 119)
In ode45 (line 115)
  2 件のコメント
Alan Stevens
Alan Stevens 2021 年 7 月 2 日
Upload your actual Matlab file.
Aditya Goel
Aditya Goel 2021 年 7 月 18 日
I approached the modelling a different way, thank you

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

回答 (0 件)

カテゴリ

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

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by