MATLAB Answers

nonlinear data fitting for a system of ODE using lsqcurvefit (finding unknown parameters)

4 views (last 30 days)
Moji on 2 Nov 2018
Edited: Moji on 3 Nov 2018
I have a set of experimental data in staedy state condtion(without time dependent). This experiment has been done at 4 different concentration including 3 compounds. the values of concentration at inlet(x=0) and outlet(x=1) are known. i used ODE15s to solve the differenial equations and find the values at outlet and then compare them with real values to find the unknown kinitic parameters(i followed but when i ran the code i got some error as below: Not enough input arguments.
Error in Untitled10>objfun (line 25)
Error in lsqcurvefit (line 202)
initVals.F = feval(funfcn_x_xdata{3},xCurrent,XDATA,varargin{:});
Error in Untitled10 (line 20)
Caused by:
Failure in initial objective function evaluation. LSQCURVEFIT cannot continue.

Sign in to comment.

Accepted Answer

Matt J
Matt J on 2 Nov 2018
Edited: Matt J on 2 Nov 2018
[kfit,Rsdnrm,Rsd,ExFlg,OptmInfo,Lmda,Jmat]=lsqcurvefit(@(K) objfun(K,Y0,x),K,Cin,yy)
Moji on 3 Nov 2018
Thanks for the suggestion. i implimened all case of options, but the issue still persists. very large erorr.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!