Re: Help with an error with NonlinearModelFit, Mathematica 7.0

*To*: mathgroup at smc.vnet.net*Subject*: [mg99600] Re: Help with an error with NonlinearModelFit, Mathematica 7.0*From*: dh <dh at metrohm.com>*Date*: Fri, 8 May 2009 00:21:18 -0400 (EDT)*References*: <gtudh6$it8$1@smc.vnet.net>

Hi, ak^2 is interpreted as the square of ak, hardly what you want. Here is an example: ============================= a =.; b =.; c =.; data = Table[{k, Log[a k^2 + b k + c]}, {k, 1, 50}] /. {a -> 1, b -> 2, c -> 3}; nlm = NonlinearModelFit[data, Log[a k^2 + b k + c], {a, b, c}, k] ============================= Daniel 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? >