Info

This question is closed. Reopen it to edit or answer.

Help. i need to get a code correction for a proper fit of data for parameter estimation of a copouled biological ODE model. Pls i'm a student researcher.

1 view (last 30 days)
@star strider
function C=models(C,t)
c0=[1;0;0;0;0];
[T,Cv]=ode45(@DifEq,t,c0);
%
%Initial conditions of the modelis given by
Cs = 700, Iq=400, Iu=300,Is=250,Cr=500,
%%% the parameter values is given by
%w=0.0346, beta1=0.05, beta2=0.02,beta3=0.7,d1=0.004,d2=0.0100,eta1=0.09871,
%eta2=0.009,alpha1=0.001, alpha2=0.000398,mu=0.0491,delta1=0.01,k=0.90,H=0.1250
function dC=DifEq(t,c)
dCdt=zeros(5,1);
dCsdt = w-(beta1.*Cs.*Iq)/H-mu.*Cs-(beta2.*Cs.*Iu)/H-(beta3.*Cs.*Is)/(Is+k);
dIqdt = (beta1.*Cs.*Iq)/H-d1.*Iq-eta1.*Iq;
dIudt = (beta2.*Cs.*Iu)/H-d2.*Iu-eta2.*Iu;
dIsdt = alpha1.*Iq+alpha2.*Iu-delta1.*Is;
dCrdt = eta1.*Iq+eta2.*Iu-mu.*Cr;
dC=dCsdt;
end
C=Cv;
end
t=[0.1
0.2
0.4
0.6
0.8
1
1.5
2
3
4
5
6];
c=[0.902 0.06997 0.02463 0.00218
0.8072 0.1353 0.0482 0.008192
0.6757 0.2123 0.0864 0.0289
0.5569 0.2789 0.1063 0.06233
0.4297 0.3292 0.1476 0.09756
0.3774 0.3457 0.1485 0.1255
0.2149 0.3486 0.1821 0.2526
0.141 0.3254 0.194 0.3401
0.04921 0.2445 0.1742 0.5277
0.0178 0.1728 0.1732 0.6323
0.006431 0.1091 0.1137 0.7702
0.002595 0.08301 0.08224 0.835];
C=[1;1;1;1;1;1];
[C,Rsdnrm,Rsd,ExFlg,OptmInfo,Lmda,Jmat]=lsqcurvefit(models,t,c);
fprintf(1,'\tRate Constants:\n')
for k1 = 1:length(theta)
fprintf(1, '\t\tTheta(%d) = %8.5f\n', k1, theta(k1))
end
tv = linspace(min(t), max(t));
Cfit = models(theta, tv);
figure(1)
plot(t, c, 'p')
hold on
hlp = plot(tv, Cfit);
hold off
grid
xlabel('Time')
ylabel('Population Profile')
legend(hlp, 'Cs(t)', 'Iq(t)', 'Iu(t)', 'Is(t)','Cs(t)', 'Location','N')
end
%Pls i need to fit all the parameters to the model
%i have supplied the parameter values and initial starts of the variables at the left hand side of the equation
%i need a code correction and help to fit
%Also, i need the error(residuals) results and fit
%Pls help i'm almost running mad!!!, I'm a research student
%Thanks

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!