Re: Help with an error with NonlinearModelFit, Mathematica 7.0

*To*: mathgroup at smc.vnet.net*Subject*: [mg99601] Re: Help with an error with NonlinearModelFit, Mathematica 7.0*From*: Bill Rowe <readnews at sbcglobal.net>*Date*: Sat, 9 May 2009 03:19:21 -0400 (EDT)

On 5/7/09 at 6:35 AM, mgao4793 at gmail.com (Anonymous) wrote: >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? Are you sure? How did you verify there were no non-numeric elements in your data? Try doing Union[Head/@Flatten[data]] where data is the array you are feeding into NonlinearModelFit. That will return a list of all data types in the array. Does it contain anything other than Integer, Real or Rational? If so, that is the problem.