Solving nonlinear equation with parameter

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

 采纳的回答

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)

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Matrix Computations 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by