How to fit the solution to Ordinary Differential Equations to data
1 次查看(过去 30 天)
显示 更早的评论
So, I want to fit the solution to the ds/dt equation of Michaelis-Menten kinetics to my data, which measues the relative concentration of a substance with respect to time, where am I going wrong here? At t = 0, S = 1
Thanks in advance for the help!
function S = EnzymeKinetics(Z , t)
% EnzymeKinetics codes the system of differential equations
% describing Michaelis-Menten Kinetics:
% dsdt = -k1*e*s + km1*(E0-e);
% dpdt = k2*(E0-e);
% dedt = -k1*e*s + km1*(E0-e) + k2*(E0-e);
%Parameters k1 = Z(1), km1 = Z(2), k2 = Z(3)
[T,X] = ode15s(@dXdT, t,x);
function [f] = dXdT(t,x)
s = x(1);
p = x(2);
e = x(3);
dsdt = -Z(1)*e*s + Z(2)*(E0-e);
dpdt = Z(3)*(E0-e);
dedt = -Z(1)*e*s + Z(2)*(E0-e) + Z(3)*(E0-e);
f =[dsdt; dpdt; dedt];
end
S = X(:,1);
end
I used this calling statement:
Z0 = rand(4,1) * 100;
[Z,Rsdnrm,Rsd,ExFlg,OptmInfo,Lmda,Jmat] = lsqcurvefit(@EnzymeKinetics,Z0,Time,Data);
And then I want to plot (time,data) as well as fthe fitted S(t)
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!