Solving two equations with 2 unknows

Dear All,
I have two equations:
Cp(t)=(Ka*D0/Vd*(Ka-Ke)) * (exp^(-Ka*t)+exp^(-Ke*t))
t=1/(Ke-Ka)* log(Ke/Ka)
D0=500; Cp=30; t=8; Vd=10;
I need to find Ka and Ke.
Please help me!
Thank you in advance :)

Réponses (1)

madhan ravi
madhan ravi le 12 Juin 2020
x = fsolve(@RootS, [1; 2])
function X = RootS(x)
D0 = 500;
Cp = 30;
t = 8;
Vd = 10;
Ka = x(1);
Ke = x(2);
eq1 = 1/(Ke - Ka) * log(Ke / Ka) - t;
eq2 = (Ka*D0 / Vd * (Ka - Ke) ) * ( exp(-Ka * t) + exp(-Ke * t)) - Cp;
X = [eq1; eq2];
end

Catégories

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

Community Treasure Hunt

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

Start Hunting!

Translated by