On Mon, 9 Aug 2004, Donald Burns wrote:
>
> f(x) = A*exp(B*x)
[...]
> fit f(x) "beam-diameter.dat" via A,B
[...]
> Undefined value during function evaluation
> The funny thing is I can evaluate f(x) from the command line just fine.
Probably --- but did you try *plotting* it along with your data file, or
evaluate it with the same range of x values as you have in your file?
The test to run is:
plot 'beam-diameter.dat', f(x)
I strongly suspect that will show the problem right away: your startup
values, esp. the one for 'B', are almost certainly way off scale, so
you're evaluating stuff like exp(1000). Which, on at least some operating
platforms, is considered forbidden by the implementation of exp() in the C
math library, and thus raises the 'undefined value' error you got.
--
Hans-Bernhard Broeker (broeker@...)
Even if all the snow were burnt, ashes would remain.
|