Eugenie
04-02-2002, 08:51 AM
I'm trying to use the function mrqmin (nonlinear least-squares fit) for fitting a function to an exponential function and to a spherical function.
Attached, a file containing the x&y values for the fitting.
The exponential function has the form:
y = a0 + a1 * (1 - exp(-3*x/A3) )
The Spherical function has the form:
y = a0 + a1 * ( 1.5 * (x/a2) - 0.5 * (x/a2)^3) )
where a0,a1 & a2 are the coefficients to be found.
I've found that only if I give a very close guess in the coefficients, then the solution converges.
Does anyone has used this fitting function?
Thanks!
Attached, a file containing the x&y values for the fitting.
The exponential function has the form:
y = a0 + a1 * (1 - exp(-3*x/A3) )
The Spherical function has the form:
y = a0 + a1 * ( 1.5 * (x/a2) - 0.5 * (x/a2)^3) )
where a0,a1 & a2 are the coefficients to be found.
I've found that only if I give a very close guess in the coefficients, then the solution converges.
Does anyone has used this fitting function?
Thanks!