Re: Exponential fit question.
- To: mathgroup at smc.vnet.net
- Subject: [mg28020] Re: Exponential fit question.
- From: Ignacio Rodriguez <ignacio at sgirmn.pluri.ucm.es>
- Date: Wed, 28 Mar 2001 02:40:51 -0500 (EST)
- References: <99pdg6$lft@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Fit will try a fit in the following way: Fit[data,{a(x),b(x)},x] will fit data to A a(x) + B b(x), where a(x) and b(x) are the functions you supply and A and B are two fit parametes. In your case, Fit[data,Exp[x],x] will fit data to A Exp[x], which is clearly not the case for your data. You can try a nonlinear fit defined in `Statistics`NonlinearFit, but I would suggest taking the logarithm of your y data and trying a linear fit. Try this: data={{50,22},{64,62},{78,122},{93,269},{107,414},{122,507},{136,597}} logdata=Table[{Part[data,i,1],Log[Part[data,i,2]]},{i,1,7}] Exp[Fit[logdata,{1,x},x]] Hope it helps > hello. > > I was wondering if someone could help me with the following problem. > > I am trying to perform an exponential fit to the following data > {{x,y}} > > data > ={{50,22},{64,62},{78,122},{93,269},{107,414},{122,507},{136,597}} > > Fit[data,Exp[x],x] > > what I get is > > 1.94272422061017735^-63 *E^x Which is not correct. > > With Excel I get 7.5*E^0.0034x which is correct. > > How can I do this with Mathematica ? > > Thanks. > -Joseph. -- Ignacio Rodriguez Ramirez de Arellano Unidad de RMN Universidad Complutense Paseo Juan XXIII, 1 Madrid 28040, Spain Tel. 34-91-394-3288 Fax 34-91-394-3245 e-mail: ignacio at sgirmn.pluri.ucm.es
- Follow-Ups:
- Re: Exponential fit question.
- From: Matthias Hertel <wir95cgu@studserv.uni-leipzig.de>
- Re: Exponential fit question.