MathGroup Archive 2009

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

Search the Archive

Re: FindFit

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105814] Re: FindFit
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Sun, 20 Dec 2009 06:54:10 -0500 (EST)

On 12/19/09 at 6:26 AM, yohan2 at spray.se (jj) wrote:

>Can anybody help me? I want to try to show my model (function) and
>my data in the same graph so I can see that my conclusions are
>correct. data= { {40,0.0624}, {50,42.2.276}, {58,127.718},
>{60,216.608}, {70,2040.088}, I used FindFit for Exponential as my
>model to plot: t200= {Exp200}

>t200= {Exp300}

>model=aExp[kt];

>fit=FindFit[data,model,{a,k},t]

Here is how I would do what you are asking:

In[1]:= data = {{40, 0.0624}, {50, 42.2 .276}, {58, 127.718}, {60,
     216.608}, {70, 2040.088}};

In[2]:= model = a Exp[t k];
param = FindFit[data, model, {{a, 1}, {k, 0}}, t]

Out[3]= {a->0.000251022,k->0.227297}

In[4]:= LogPlot[model /. param, {t, 35, 75},
  Epilog -> {PointSize[.02], Point[data /. {s_, b_} :> {s, Log[b]}]},
  PlotRange -> {.001, 5000}]

  It looks like either a simple exponential is not a good model
for your data or there is a problem with the data point {40,
0.0624}. If this point were deleted, there would be no apparent
problem with the fit.



  • Prev by Date: Re: CellChangeTimes?
  • Next by Date: Re: FindFit constrains when parameters are in table
  • Previous by thread: Re: FindFit
  • Next by thread: NIntegrate with Numeric Matrix Function