Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: lsqnonlin - LM - not enough input args
Replies: 1   Last Post: Dec 9, 2013 10:41 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Alan Weiss

Posts: 1,208
Registered: 11/27/08
Re: lsqnonlin - LM - not enough input args
Posted: Dec 9, 2013 10:41 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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/passing-extra-parameters.html

Alan Weiss
MATLAB mathematical toolbox documentation



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.