Solving nonlinear equation with parameter
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Leszek
el 11 de Jul. de 2023
Comentada: Leszek
el 12 de Jul. de 2023
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

0 comentarios
Respuesta aceptada
Torsten
el 11 de Jul. de 2023
Editada: Torsten
el 11 de Jul. de 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)
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
