Non linear fit in octave

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Non linear fit in octave

Francesco Potorti`-9
Hi, I  would  like to   fit some one-dimensional   data  to a  nonlinear
function, namely Y=v.*X.^(2*h), where I want to find v and h.

I found  ftp://ftp.mathworks.com/pub/contrib/v4/optim/curvefitnl.m,  but
it uses a leastsq function that, it seems, does all the job.  I guess it
is a standard function of matlab.  So I'm stuck.  Any suggestions?

Thanks to everybody

--
Francesco Potorti` (researcher)        Voice:    +39-050-593 203 (op. 211)
Computer Networks Group                Fax:      +39-050-904052
CNUCE-CNR, Via Santa Maria 36          Email:    [hidden email]
56126 Pisa - Italy                     Web: http://fly.cnuce.cnr.it/


Reply | Threaded
Open this post in threaded view
|

RE: Non linear fit in octave

Ted.Harding
On 20-Aug-98 Francesco Potorti` wrote:
> Hi, I  would  like to   fit some one-dimensional   data  to a  nonlinear
> function, namely Y=v.*X.^(2*h), where I want to find v and h.
>
> I found  ftp://ftp.mathworks.com/pub/contrib/v4/optim/curvefitnl.m,  but
> it uses a leastsq function that, it seems, does all the job.  I guess it
> is a standard function of matlab.  So I'm stuck.  Any suggestions?

Is there a reason for not taking logs and doing an ordinary (least sqaures)
regression of W = a + b*U where W=log(Y), U=log(X), a=log(v), b=log(2*h)?

Cheers,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <[hidden email]>
Date: 20-Aug-98                                       Time: 18:12:28
--------------------------------------------------------------------