MathGroup Archive 2003

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

Search the Archive

RE: NonlinearFit

  • To: mathgroup at smc.vnet.net
  • Subject: [mg42126] RE: [mg42109] NonlinearFit
  • From: "Florian Jaccard" <jaccardf at eicn.ch>
  • Date: Fri, 20 Jun 2003 04:57:27 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

It works fine !

In[1]:=
data = {{0.1, 0.113387476}, {0.2, 0.194633152},
    {0.3, 0.252848224}, {0.4, 0.294561145},
    {0.5, 0.324449759}, {0.6, 0.345865887},
    {0.7, 0.361211213}, {0.8, 0.37220662},
    {0.9, 0.380085173}, {1., 0.385730403}};

In[2]:=
<< "Statistics`NonLinearFit`"

In[6]:=
f[x_] = NonlinearFit[data, c*(1 - E^(-3*(x/a))), x,
   {a, c}]

Out[6]=
0.40000000043347517*(1 - E^(-3.33333333010406*x))

In[4]:=
<< "Graphics`MultipleListPlot`"

In[5]:=
<< "Graphics`Graphics`"

In[7]:=
DisplayTogether[MultipleListPlot[data],
   Plot[f[x], {x, 0, 1}]];

Meilleures salutations

Florian Jaccard

-----Message d'origine-----
De : Rees [mailto:civnrn at hotmail.com]
Envoyé : jeu., 19. juin 2003 10:00
À : mathgroup at smc.vnet.net
Objet : [mg42109] NonlinearFit


Hi,

Please could someone assist me in curve fitting.

I have the following x,y data

data = {{0.1,0.113387476}, {0.2, 0.194633152}, {0.3,
      0.252848224}, {0.4, 0.294561145}, {0.5,
      0.324449759}, {0.6, 0.345865887}, {0.7,
      0.361211213}, {0.8, 0.37220662}, {0.9,
      0.380085173}, {1.0, 0.385730403}};

Now I wish to fit an exponential curve of the form below to it:

c*[1-Exp(-3x/a]

where c and a are parameters to be determined.

I tried the following but it doesn't work:

NonlinearFit[data, c*(1 - Exp(-3*x1/a)), {x1}, {c, a}]


Please advise.

Thanks is advance

Rees



  • Prev by Date: Re: "Sloppy Union"? (Union of a list with *nearly* equ
  • Next by Date: Re: Diophant equation
  • Previous by thread: RE: NonlinearFit
  • Next by thread: Re: NonlinearFit