>  Docs Center  >  Libraries  >  Buie  >  RCGFIT
Libraries

RCGFIT

RCGFIT

Name


rcgfit

Purpose


Fit a radial gaussian function to the input data (no linear term).

Description


  Fit the equation y=f(r) where:
  F(r) = A0*EXP(-z^2/2) + A2 + A3*r^2
  and
z=r/A2
A0 = height of exp, A1 = sigma (the width).
A2 = constant term, A3 = quadratic term.
  The parameters A0, A1, A2 are estimated and then CURVEFIT is
called. The gaussian is assumed to be centered at r=0.

Category


Function fitting

Calling Sequence


Result = RCGAUSSFIT(R, Y [, A])

Inputs


R: The independent variable. R must be a vector.
Y: The dependent variable. Y must have the same number of points
as R.

Outputs


The fitted function is returned.

Optional Output Parameters


A: The coefficients of the fit. A is a three-element vector as
described under PURPOSE.

Common Blocks


None.

Side Effects


None.

Restrictions


Procedure


The initial guess of the intensity is the value of the point
with the smallest r value. The first point that drops below
half of the first is the guess at the width.

Modification History


DMS, RSI, Dec, 1983.
Rewritten to change initial guess, MWB, Lowell Obs., Dec. 1992.
Rewritten to remove background function, MWB, Lowell Obs., Jan. 1993.



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us