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

 Réponse acceptée

Torsten
Torsten le 11 Juil 2023
Modifié(e) : Torsten le 11 Juil 2023
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)

Plus de réponses (0)

Catégories

En savoir plus sur Mathematics dans Centre d'aide et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by