1c_ftcurvs(3NCARG) NCAR GRAPHICS c_ftcurvs(3NCARG)
2
3
4
6 c_ftcurvs - compute a smoothing spline
7
9 int c_ftcurvs (int, float [], float [], int, float [], int, float [],
10 float []);
11
13 int c_ftcurvs (n, xi, yi, dflg, d, m, xo, yo);
14
16 n The number of input data points. (n > 1)
17
18 xi An array containing the abscissae for the input function.
19
20 yi An array containing the functional values of the input
21 function (yi[k] is the functional value at x[k] for
22 k=0,n-1).
23
24 dflg A switch for interpreting the value of d (as described
25 below). If dflg=0, then d is an array of length n (an
26 error estimate for each input data value); if dflg=1, then
27 d is a scalar that serves as an error estimate for every
28 single data item.
29
30 d A user-specified value containing the observed weights. d
31 may either be an array or a scalar, depending on the value
32 of dflg.
33
34 m The number of output values.
35
36 xo Contains the abscissae for the output values.
37
38 yo Contains the functional values for the smoothing spline
39 ((yo[k] is the functional value at xo[k] for k=0,n-1).
40
42 c_ftcurvs returns an error value as per:
43
44 = 1 if n is less than 2.
45 = 2 if smt is negative.
46 = 3 if eps is negative or greater than 1.
47 = 4 if x values are not strictly increasing.
48 = 5 if d is negative.
49
51 This function computes an interpolatory smoothing spline under tension
52 through a sequence of functional values.
53
54 Two parameters and one function argument used to control the degree of
55 smoothness -- the parameters are smt, and eps and the function argument
56 is d.
57
58 The argument d is a value indicating the degree of confidence in the
59 accuracy of the input function values -- it should be an approximation
60 of the standard deviation of error. Effectively the value of d controls
61 how close the smoothed curve comes to the input data points. If d is
62 small, then the interpolated curve will pass close to the input data.
63 The larger the value of d, the more freedom the smooth curve has in how
64 close it comes to the input data values.
65
66 The parameter smt is a more subtle global smoothing parameter; smt must
67 be non-negative. For small values of smt, the curve approximates the
68 tension spline and for larger values of smt, the curve is smoother. A
69 reasonable value for smt is (float) n.
70
71 The parameter eps controls the precision to which smt is interpreted;
72 eps must be between 0. and 1. inclusive. A reasonable value for eps
73 sqrt( 2./(float) n ).
74
75 c_ftcurvs is called after all of the desired values for control parameā
76 ters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetc.
77 Control parameters that apply to c_ftcurvs are: sig, smt, eps, sf2.
78
79 The value for the parameter sig specifies the tension factor. Values
80 near zero result in a cubic spline; large values (e.g. 50) result in
81 nearly a polygonal line. A typical value is 1. (the default).
82
84 To use c_ftcurvs, load the NCAR Graphics library ngmath.
85
87 fitgrid_params, c_ftseti, c_ftsetr, c_ftsetc.
88
89 Complete documentation for Fitgrid is available at URL
90 http://ngwww.ucar.edu/ngdoc/ng/ngmath/fitgrid/fithome.html
91
93 Copyright (C) 2000
94 University Corporation for Atmospheric Research
95
96 The use of this Software is governed by a License Agreement.
97
98
99
100UNIX March 1998 c_ftcurvs(3NCARG)