[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: exponential fitting

From: grundmann
Subject: Re: exponential fitting
Date: Thu, 5 Sep 2002 16:29:21 +0200

On Wed, 4 Sep 2002 16:47:49 +0200
Gert Van den Eynde <address@hidden> wrote:

> expfit returns the root mean square (rms): 
> sqrt(sum((data(i)-fitting_evaluation(i))**2)), you would want to square this, 
> no ?
Yes, thank you. I didn't know that expfit returns the root mean square. 

> expfit will return a term where b = 0 and a is the constant 'c' you're 
> looking for (exp(0*x) = 1).

Sorry, I don't understand what you've written. AFAIK expfit uses y=a*exp(b*x) 
fitting the data and returns three values: a, b, and the rms. Actually I don't 
need the value of 'c', but to get the right 'b' I have to fit it with 
y=a*exp(b*x)+c. That's the problem. 

And there is another problem: the fit is really bad. 
Fitting the same data with expfit and leasqr, I get:

fit-function: y=a*exp(b*x)+1  
expfit: y=9.7*exp(-0.0029*x)+1   R^2=54.8
leasqr: y=9.5*exp(-0.0018*x)+1   R^2=97

I used a konstant c=1, otherwise I can't compare the results.

But expfit seems to be very stable and easy to use, while leasqr is very 
sensitive to the starting values.

Jens Grundmann

Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]