Curve fitting in a for loop

I have a system of difference equations expressed in a for loop. I have experimental data that I would like to fit some parameters to. Could anyone provide some insight into how to proceed. I've experimented with lsqnonlin, lsqcurvefit, and fminsearch to no avail.
parameters to fit: c(1,2,3)
parameters to fix: b,d,KX1,KX2,KX3
system:
for t=1:9
CtlA(t)=X1(t) + X2(t) + X3(t);
X1(t+1)=b*X3(t);
X2(t+1)=X1(t)/((1+c(1)*CtlA(t))*KX1*d);
X3(t+1)=(X2(t)/((1+c(2)*CtlA(t))*KX2*d))+(X3(t)/((1+c(3)*CtlA(t))*KX3*d));
end
Any help would be gladly appreciated!

댓글 수: 2

Andrew Newell
Andrew Newell 2011년 4월 5일
This for loop seems to have X1, X2 and X3 as both input and output. Are they the data? Are you trying to fit them to some function of t?
Andrew Newell
Andrew Newell 2011년 4월 5일
The parameter d is redundant because it is always multiplied by some other parameter. You could set it to 1.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

질문:

2011년 4월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by