MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Help with an error with NonlinearModelFit, Mathematica 7.0

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99579] Re: Help with an error with NonlinearModelFit, Mathematica 7.0
  • From: Peter Pein <petsie at dordos.net>
  • Date: Fri, 8 May 2009 00:17:26 -0400 (EDT)
  • References: <gtudh6$it8$1@smc.vnet.net>

Anonymous schrieb:
> I'm trying to find a fit to a large set of data.
> 
> Here are In[1], In[2].
> 
> In[1] := {{421.1, 6591.10}, ...};
> 
> (there are way more points, in fact there are 35 in total, but I don't
> want to list them.  All are real numbers.)
> 
> In[2] := nlm = NonlinearModelFit[data, Log[ak^2 + bk + c], {a,b,c}, k]
> 
> Then mathematica gives an error that basically says that the function
> "is not a list of real numbers"
> 
> Of course it is, so how do I fix this?
> 

Hi,
I can't reproduce this message using Mathematica 6:
In[1]:= data = Transpose[{#,Log[#^2-#+2]+Random[]/10}&[RandomReal[{0,500},{35}]]];
In[2]:= nlm=FindFit[data,Log[a k^2+b k+c],{a,b,c},k]
Out[2]= {a->1.04002,b->-1.04002,c->2.08004}

=> either it is a bug in version 7 or your data leads to some Logs of negative 
numbers. Please submit the list.

Peter


  • Prev by Date: Re: Help with an error with NonlinearModelFit, Mathematica 7.0
  • Next by Date: Re: number of Trangles in a graph-network
  • Previous by thread: Re: Help with an error with NonlinearModelFit, Mathematica 7.0
  • Next by thread: Re: Help with an error with NonlinearModelFit, Mathematica 7.0