|
[Date Index]
[Thread Index]
[Author Index]
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
|