SCULIB_MRQCOF
called by SCULIB_MRQMIN
Description:
Utility routine called by
SCULIB_MRQMIN, copied from Numerical Recipes in Fortran, p. 681. Used by SCULIB_MRQMIN to
evaluate the linearised fitting matrix ALPHA, and vector BETA, and calculate chi-squared. Copied
from MRQCOF on p.681 of Numerical Recipes in Fortran, with STATUS added.
Invocation
CALL
SCULIB_MRQCOF (X, Y, SIG, NDATA, A, IA, MA, ALPHA, BETA, NALP, CHISQ, FUNCS, STATUS)
Arguments
X( NDATA ) = REAL (Given)
X Data points
Y( NDATA ) = REAL (Given)
Y data
points
SIG ( NDATA ) = REAL (Given)
NDATA = INTEGER (Given)
Number of data points in
arrays
A( MA ) = REAL (Given & Returned)
The input parameter values. Contains the best-fit
values on exit.
IA( MA ) = INTEGER (Given)
Array specifying which components should be
fitted. A zero indicates the parameter should not be fitted – the parameters are kept at their
input values. Non-zero indicates the parameter is free to be modified.
MA = INTEGER
(Given)
Number of coefficients/parameters for function.
ALPHA( NALP, NALP ) =
REAL (Returned)
BETA( MA ) = REAL (Returned)
NALP = INTEGER (Given)
Size
of ALPHA.
CHISQ = REAL (Returned)
ChiSq of fit.
FUNCS = REAL FUNCTION
(Given)
The function to be fitted. Must take arguments of X, A, YFIT, DYDA and MA, where
YFIT is the fitting function and DYDA the the derivatives with respect to parameters A at
X.
STATUS = INTEGER (Given & Returned)
Global Status
Copyright
Copyright
©1995,1996,1997,1998,1999 Particle Physics and Astronomy Research Council. All Rights Reserved.