ncl_c_ftcurvs1 (3) - Linux Manuals
ncl_c_ftcurvs1: calculate values for a smoothing spline for data in the plane.
NAMEc_ftcurvs1 - calculate values for a smoothing spline for data in the plane.
FUNCTION PROTOTYPEint c_ftcurvs1(int, float , float , int, float ,
SYNOPSISint c_ftcurvs1(int n, float xi, float yi, int dflg,
- The number of input data points. (n > 1)
- An array containing the X-coordinates for the input data. These need not be increasing.
- An array containing the Y-coordinates for the input data.
- A switch for interpreting the value of d (as described below). If dflg=0, then d is an array of length n (an error estimate for each input data value); if dflg=1, then d is a scalar that serves as an error estimate for every single data item.
- A user-specified value containing the observed weights. D may be either an array or a scalar, depending on the value of dflg.
- The number of output values.
- A lower limit for an interval of interpolation. The interval between zero and one interpolates the entire curve, any value outside this range results in extrapolation. The interval [xl,xr] is divided into m equal values to produce the interpolated curve.
- An upper limit for an interval of interpolation. The interval between zero and one interpolates the entire curve, any value outside this range results in extrapolation. The interval [xl,xr] is divided into m equal values to produce the interpolated curve.
- The interpolated X values.
- The interpolated Y values.
RETURN VALUEc_ftcurvs1 returns an error value as per:
USAGEThis function computes an interpolatory smoothing spline under tension through a sequence of data values in the plane.
Two parameters and one function argument are used to control the degree of smoothness -- the parameters are smt, and eps and the function argument is d.
The argument d is a value indicating the degree of confidence in the accuracy of the input function values -- it should be an approximation of the standard deviation of error. Effectively the value of d controls how close the smoothed curve comes to the input data points. If d is small, then the interpolated curve will pass close to the input data. The larger the value of d, the more freedom the smooth curve has in how close it comes to the input data values.
The parameter smt is a more subtle global smoothing parameter; smt must be non-negative. For small values of smt, the curve approximates the tension spline and for larger values of smt, the curve is smoother. A reasonable value for smt is (float) n. smt can be set with the procedure c_ftsetr.
The parameter eps controls the precision to which smt is interpreted; eps must be between 0. and 1. inclusive. A reasonable value for eps sqrt( 2./(float) n ). eps can be set with the procedure c_ftsetr.
c_ftcurvs1 is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetc. Control parameters that apply to c_ftcurvs are: sig, smt, eps, sf2.
ACCESSTo use c_ftcurvs1, load the NCAR Graphics library ngmath.
COPYRIGHTCopyright (C) 2000
University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
SEE ALSOfitgrid_params, c_ftseti, c_ftsetr, c_ftsetc.
Complete documentation for Fitgrid is available at URL