Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

Re: Extracting parameters from NonlinearFit



Jeff Wank wrote

> Recently I began writing a program to do a monte carlo simulation of an
> NMR experiment. The whole routine is attached (I hope that works.) The
> problem is this:
> I perform a NonlinearFit utilizing an exponential function of the form
> Exp[-a*x]. The nonlinear fit gives me back an equation, something like
> 1*E(-a*x). I want to extract the a parameter out of the equation

Jeff,

NonlinearRegress giveve more information then NonlinearFit, inlcuding
replacement rules for the parameters.

<<Statistics`NonlinearFit`

Example

data =Table[{t,3.2*Exp[-0.5*t]  +(Random[]-.5)}, {t,0,2,.2}];

BestFitParameters/.NonlinearRegress[data, a Exp[b t], {t},{a,b},
RegressionReport -> BestFitParameters]

{a -> 3.16783, b -> -0.512375}


f[t_]= a Exp[b t]/.%

  3.16783
-----------
 0.512375 t
E


-- 
Allan Hayes
Training and Consulting
Leicester, UK
hay@haystack.demon.co.uk
http://www.haystack.demon.co.uk
voice: +44 (0)116 271 4198
fax: +44 (0)116 271 8642




  • Prev by Date: Re: blank line
  • Next by Date: table export (sol'n not in deja news)
  • Prev by thread: Re: Extracting parameters from NonlinearFit
  • Next by thread: Re: Installation of Mathematica 3.0.2 on NextStep