MathGroup Archive 2011

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

Search the Archive

Re: NonlinearFit for specific data

  • To: mathgroup at smc.vnet.net
  • Subject: [mg117848] Re: NonlinearFit for specific data
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Fri, 1 Apr 2011 02:36:17 -0500 (EST)

That model appears to fit your data very poorly. Perhaps you should look at a different model.

data2 = {{0, 773.59}, {30, 2351.12}, {60, 4205.8}, {90, 4222.69}, {120, 
    4222.69}, {150, 704.328}, {180, 1388.28}, {210, 1388.28}, {240, 
    1821.23}, {270, 1821.23}, {300, 754.109}, {330, 773.59}, {360, 773.59}};

Partition[Table[
   param = Array[a, n + 1];
   model = Total[param*x^Range[0, n]];
   fit = FindFit[data2, model, param, x];
   Plot[model /. fit, {x, 0, 360},
    PlotRange -> {500, 5000},
    Frame -> True, Axes -> False,
    Epilog -> {Text["n = " <> ToString[n], Scaled[{.8, .9}]],
      Red, AbsolutePointSize[4], Point[data2]}],
   {n, 2, 10}], 3] // Grid


Bob Hanlon

---- Alexandre Souza <costamfix at gmail.com> wrote: 

=============
Dear Group,
I have the following data :
data2 = {  {0, 773.59},{30, 2351.12},{60, 4205.8}, {90, 4222.69},{120,
4222.69},{150, 704.328},
{180, 1388.28},{210, 1388.28},{240, 1821.23},{270, 1821.23},{300,
754.109},{330, 773.59},{360, 773.59}};
I want the following curve fit :
 NonlinearFit[data2, Exp[ a + b x + c x^2], x, {a, b, c}]
Unfortunatelly I get some "FindFit::sszero
FindMinimum::sszero" message, and the given result is ackward.
I also tried FindFit and NonlinearRegress without success.
Any comment would be very welcome.
Alex




  • Prev by Date: Re: Series holding the final sum
  • Next by Date: Re: Why Mathematica does not issue a warning when the calculations
  • Previous by thread: Re: NonlinearFit for specific data
  • Next by thread: Re: NonlinearFit for specific data