How to fit the solution to Ordinary Differential Equations to data

조회 수: 1 (최근 30일)
Henry Carey-Morgan
Henry Carey-Morgan 2021년 8월 23일
편집: darova 2021년 8월 23일
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개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by