The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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,430
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:
or lsqnonlin, if that is your function:

There are also better ways to pass extra parameters:

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]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.