Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How to check data fit of differential equations

조회 수: 2 (최근 30일)
David
David 2015년 5월 29일
마감: MATLAB Answer Bot 2021년 8월 20일
I'm quite illiterate in Matlab, using previously written code, so please bear with me.
Using a genetic algorithm, I have solved four differential equations, (for four different experiments), for 11 parameters (stored as par.alpha, par.beta, ...)
Now my GA spit out a fitness value (fvalN) at the end, but I need to find the R^2 fit of this to the data without running the whole GA again. I am going to manually mess with the parameters to check which ones the model is most sensitive too. In another post of mine it was recommended I use norm(dy) but I'm not sure how to go about this.
My equations are in WTTNF.m:
function dy = WTTNF(~,y,par)
dy = zeros(4,1);
dy(1) = par.alpha*y(1)*(1-y(1)/y(4))-par.beta*y(1)-par.gamma*y(3)*y(1);
dy(2) = par.beta*y(1)+par.zeta*par.gamma*y(3)*y(1)-par.delta*y(2);
dy(3) = par.theta*y(2)+par.epsilon;
dy(4) = par.eta_c*y(3)*y(1)+par.eta_h*y(3)-par.psi*y(4)*(y(4)/par.Ko)^2;
How do I check the fit of this data with what is stored in the value "data," i.e.
>> data
data =
t: [0 1 2 3 6 8]
val: [4x6 double]
To further complicate things, I have four different cases where various parameters are inactive and I need to get the fit for all of them. But one thing at a time.
-Dave K

답변 (1개)

Star Strider
Star Strider 2015년 5월 29일
I would use your currently estimated parameters (as the initial parameter estimates) and the sort of procedure outlined in Monod kinetics and curve fitting, but using nlinfit or fitnlm (instead of lsqcurvefit), and the Statistics Toolbox functions to get statistics on the parameters and fit.

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by