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: nonlineat fit
Replies: 5   Last Post: Oct 23, 2013 1:47 PM

Advanced Search

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

Posts: 9,850
Registered: 6/7/07
Re: nonlineat fit
Posted: Oct 22, 2013 7:14 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 10/22/2013 5:31 PM, Mario Georgiou wrote:

> =@(c,xdata)c(1).*xdata(:,1).^c(2).*xdata(:,2).^c(3).*xdata(:,3) ...


> %initial guess
> x0=[0 0 0 0 1];
> %run the solver
> X= lsqcurvefit(FUN,x0,xdata,HTC
> when i try to run it's giving this error message:
> ??? Attempted to access c(6); index out of bounds because numel(c)=5.


x0 has only five elements for six coefficients -- you're one short.


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.