Re: FindFit issue
- To: mathgroup at smc.vnet.net
- Subject: [mg86408] Re: FindFit issue
- From: dh <dh at metrohm.ch>
- Date: Tue, 11 Mar 2008 02:54:17 -0500 (EST)
- References: <fr2mhj$o5h$1@smc.vnet.net>
Hi,
if FindFit does not have any initial values to start its search, it must
make an initial guess. Such a guess may result in a complex function
value. To prevent this, you must specify a reasonable starting value.
hope this helps, Daniel
t.dubaj at gmail.com wrote:
> Hi,
> I am trying to fit experimental data
>
> d = {{1000, 44.576*10^(-3)},
> {600, 49.546*10^(-3)},
> {800, 46.757*10^(-3)},
> {400, 55.023*10^(-3)},
> {200, 61.209*10^(-3)},
> {10, 71.584*10^(-3)},
> {100, 65.367*10^(-3)}}
>
> and model is:
>
> y = 0.072214 - a*Log[10, 1+b*x]
>
> but Mathematica after typing
>
> FindFit[d, 0.072214 - a*Log[10, 1 + b*x], {a, b}, x]
>
> return
>
> FindFit::nrlnum: The function value {-0.0226973-0.0208168 \
> \[ImaginaryI],<<5>>,-0.0282009-<<21>> \[ImaginaryI]} is not a list of
> \
> real numbers with dimensions {7} at {a,b} = {0.0152574,-1.99204}.
>
> {a -> 0.0152574, b -> -1.99204}
>
> (especialy value of "b" is really awful - negative number in Log)
>
> But I know, there is Fit (calculated in Scientist) with coefficients
> a = 0.033706
> b = 0.0057934
>
> Can someone explain what I'm doing wrong?
>
> Best regards,
>
> T.D.
>
>
>