Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: lsqnonlin  LM  not enough input args
Posted:
Dec 9, 2013 10:41 AM


On 12/7/2013 3:51 PM, Oxana USHAKOVA wrote: > Hello, I need some help with optimization toolbox. > > I'm trying to run the Levenberg opt process using Optimization toolbox. > As input, I have a residual function RM_H and start points x0: >  > function rm = RM_H (V0,theta,kappa,omega,rho) > Mkt = [ > 81.056 > 71.075...(so on).. > ]; > rm = Mkt  feval(@FFT_H,V0,theta,kappa,omega,rho); > end >  > x0 = [0.1 0.1 0.1 0.1 0.1] >  > > The opt toolbox always returns me the same error : not enough inout > arguments. > However, I get the good return on RM_H if I run it independently. I've > also tried this code for another objective function where I had only > one parameter to calibrate and I got my results. > PS: FFT_H also has a feval function in it, but as I said, this code > works well out of toolbox. > > Thanks a lot!!! > Have a good day, > Oxana
Perhaps you should examine the syntax for lsqcurvefit, if that is what you are trying to use: http://www.mathworks.com/help/optim/ug/lsqcurvefit.html or lsqnonlin, if that is your function: http://www.mathworks.com/help/optim/ug/lsqnonlin.html
There are also better ways to pass extra parameters: http://www.mathworks.com/help/optim/ug/passingextraparameters.html
Alan Weiss MATLAB mathematical toolbox documentation



