Solving two equations with 2 unknows
Show older comments
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 :)
Answers (1)
madhan ravi
on 12 Jun 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
Categories
Find more on Audio and Video Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!