Curve fitting in a for loop
Mostrar comentarios más antiguos
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 comentarios
Andrew Newell
el 5 de Abr. de 2011
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
el 5 de Abr. de 2011
The parameter d is redundant because it is always multiplied by some other parameter. You could set it to 1.
Respuestas (0)
Categorías
Más información sobre Get Started with Curve Fitting Toolbox en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!