Fit a curve to the data FITCURVE
The resultant fit parameters are displayed and written to the environment for use by the PLOTFUN application, which can re-plot the polynomial or spline with other datasets etc.
"
POLY"
or "
SPLINE"
If the parameter is not specified on the command line, it will be prompted for.
If the parameter is not specified on the command line, it will be prompted for.
If no value is specified on the command line, the current value is used. If there is no current value, a default of 2 (i.e. red) will be used.
If the value is not specified on the command line, the current value is used. If there is no current value, a default value of TRUE is used.
"
POLY"
, the polynomial coefficients resulting from the fit are written to this
parameter.
The value of this parameter is written to the global parameter PONGO_POLYCOEF.
[POLYFILE.dat]
"
SPLINE"
. This factor
determines the tradeoff between the closeness and smoothness of the spline fit. It should be a real
number greater than 0.0. Normally this is dynamically defaulted to a number equal to the number of
points to be fitted. Decreasing this value to 0.0 produces an interpolating spline fit. "
SPLINE"
. This file can be used by the PLOTFUN command to redraw the
fit.
[The value of the global parameter PONGO_SPLINEF is used. If PONGO_SPLINEF is not defined, the value is prompted for.]
The value of the global parameter PONGO_XMIN is used. If PONGO_XMIN is not defined, the default value 0.0 is used.
The value of the global parameter PONGO_XMAX is used. If PONGO_XMAX is not defined, the default value 1.0 is used.
This routine fits a general polynomial of the form:
y =
which has order n-1, using a least squares approach.
The spline fit is characterised by the positions of the knots and the spline coefficients (and the order used for the splines) all of which are stored in the spline file. The number of knots used in the fit can only be influenced by using the SMOOTH parameter. Higher values of this give larger smoothing factors. A value of 0 gives an interpolating spline fit.