Re: Help fitting Exponential curves

*To*: mathgroup at smc.vnet.net*Subject*: [mg29029] Re: Help fitting Exponential curves*From*: "Joseph C. Slater" <joseph.slater at wright.edu>*Date*: Fri, 25 May 2001 01:48:05 -0400 (EDT)*Organization*: Wright State University*References*: <9efk8o$1da@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

In article <9efk8o$1da at smc.vnet.net>, Todd <tcs3a at virginia.edu> wrote: > Hello, > I am looking to fit some exponential curves to a form of > P=Po*e^(-K*t) where K and Po are values I need. The P and t I have. > I'm working with mathematica 4.1 and I can read the data and plot it fine > but it doesn't want to give me reasonable fits. > So I guess my question is how would you go about getting the Fitting to > work on fitting a Pre-Exponential and an exponential variable. If I type > > PeakFit[x_] = Fit[Peak, Exp[-x], x] > > it only gives me a Pre-exponential, however if I type. > > PeakFit[x_] = Fit[Log[Peak], {-x,Log[x]}, x] > > It just doesn't like that. Could Someone Please point me in the right > direction. > > > Thank you, > > Todd > > If you take the natural log of the data, you are then fitting to the functions ln(P [your data]) = ln Po + ln (e^-K*t) which is ln(P [your data]) = ln Po +-K*t which can be written as A+B*t where A is ln(Po) and B is -K. Now you can do a simply polynomial curve fit to obtain A and B, from which P and K can be derived. I don't recall the commands for all of this in Mathematica, but it can't be too hard from here. JS