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: curve fitting



> From Paul.Hanson@colorado.edu Fri Jan  9 08:23:20 1998
> Date: Thu, 8 Jan 1998 23:41:12 -0500
> From: Paul.Hanson@colorado.edu
To: mathgroup@smc.vnet.net
> To: mathgroup@smc.vnet.net
> Subject: [mg10364] [mg10355] curve fitting
> 
> I'm trying to fit a function of the form: f[x_]:= Exp^(a*x)
> 
> Now, I can fit the exponential without the constant, but I'm really
> interested in knowing what the constant is but I haven't found a way to
> code this.   Helpful suggestions?
> 
> Dr. Paul Hanson, Ph.D.
> University of Colorado, Boulder

Hi Paul,

say You have data={{x1,y1},{x2,y2},...} and You want to find a least
square approximation for the model y==b*Exp[a], than Log[y]=Log[b]+a*x
and You can use the linear Fit[] function by

lnData=data /. {x_?NumericQ,y_?NumericQ} :> {x,Log[y]}

fitfun=Fit[lnData,{1,x},x]

You will get back a function

LnBApp+aApp*x

Hope that helps
Jens



  • Prev by Date: howto interrupt with mathlink
  • Next by Date: debugging MathLink executables
  • Prev by thread: Re: curve fitting
  • Next by thread: Re: curve fitting