Solving nonlinear equation with parameter

2 ビュー (過去 30 日間)
Leszek
Leszek 2023 年 7 月 11 日
コメント済み: Leszek 2023 年 7 月 12 日
Hi!
I'm totally new to Matlab evironment and I think that might be a very easy question, but I just can't find an answer.
I need to solve this equation for X:
ϵ, k, n and C are known constants, but I want to obtain solutions depending on τ.
I tried to write it whis way, but I think it requires more complicated solution

採用された回答

Torsten
Torsten 2023 年 7 月 11 日
編集済み: Torsten 2023 年 7 月 11 日
Tau = 0:0.01:1;
kc0 = 270;
Ea1 = 21500;
Ea2 = 121500;
n = 0.63;
eps = 0.52;
Cch4 = 0.2;
Temp = 800 + 273;
kcmax = kc0*exp(-Ea1/8.314/Temp);
C0 = 0.5;
for i = 1:numel(Tau)
tau = Tau(i);
fun = @(x) kcmax*tau*Cch4^(n-1)/(1+eps*x)^n-x/(1-x)^n;
C(i) = fsolve(fun,C0,optimset('Display','none'));
C0 = C(i);
end
plot(Tau,C)
  1 件のコメント
Leszek
Leszek 2023 年 7 月 12 日
Thanks for a quick response! :)

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

その他の回答 (0 件)

製品

Community Treasure Hunt

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

Start Hunting!

Translated by