1c_ftcurvps(3NCARG)               NCAR GRAPHICS              c_ftcurvps(3NCARG)
2
3
4

NAME

6       c_ftcurvps - compute a smoothing spline for periodic functions.
7

FUNCTION PROTOTYPE

9       int c_ftcurvps (int, float [], float [], float, int, float [], int,
10                         float [], float []);
11

SYNOPSIS

13       int c_ftcurvps (n, xi, yi, p, dflg, d, m, xo, yo);
14

DESCRIPTION

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       p           The period of the function.
25
26       dflg        A  switch  for  interpreting  the  value of d (as described
27                   below).  If dflg=0, then d is an  array  of  length  n  (an
28                   error  estimate for each input data value); if dflg=1, then
29                   d is a scalar that serves as an error  estimate  for  every
30                   single data item.
31
32       d           A  user-specified  value containing the observed weights. d
33                   may either be an array or a scalar, depending on the  value
34                   of dflg.
35
36       m           The number of output values.
37
38       xo          Contains the abscissae for the output values.
39
40       yo          Contains  the  functional  values  for the smoothing spline
41                   ((yo[k] is the functional value at xo[k] for k=0,n-1).
42

RETURN VALUE

44       c_ftcurvps returns an error value as per:
45
46       = 1 if n is less than 2.
47       = 2 if smt is negative.
48       = 3 if eps is negative or greater than 1.
49       = 4 if x values are not strictly increasing.
50       = 5 if d is negative.
51       = 6 if p is less than or equal to X(N)-X(1).
52

USAGE

54       This function computes an interpolatory smoothing spline under  tension
55       through a sequence of functional values of a periodic function.
56
57       Two  parameters and one function argument used to control the degree of
58       smoothness -- the parameters are smt, and eps and the function argument
59       is d.
60
61       The  argument  d  is a value indicating the degree of confidence in the
62       accuracy of the input function values -- it should be an  approximation
63       of the standard deviation of error. Effectively the value of d controls
64       how close the smoothed curve comes to the input data points.  If  d  is
65       small,  then  the interpolated curve will pass close to the input data.
66       The larger the value of d, the more freedom the smooth curve has in how
67       close it comes to the input data values.
68
69       The parameter smt is a more subtle global smoothing parameter; smt must
70       be non-negative. For small values of smt, the  curve  approximates  the
71       tension  spline  and for larger values of smt, the curve is smoother. A
72       reasonable value for smt is (float) n.
73
74       The parameter eps controls the precision to which smt  is  interpreted;
75       eps  must  be  between  0. and 1. inclusive. A reasonable value for eps
76       sqrt( 2./(float) n ).
77
78       c_ftcurvps is called after all of the desired values for control param‐
79       eters  have been set using the procedures c_ftseti, c_ftsetr, c_ftsetc.
80       Control parameters that apply to c_ftcurvps are: sig, smt, eps, sf2.
81
82       The value for the parameter sig specifies the tension  factor.   Values
83       near  zero  result  in a cubic spline; large values (e.g. 50) result in
84       nearly a polygonal line. A typical value is 1. (the default).
85

ACCESS

87       To use c_ftcurvps, load the NCAR Graphics library ngmath.
88

SEE ALSO

90       fitgrid_params, c_ftseti, c_ftsetr, c_ftsetc.
91
92       Complete documentation for Fitgrid is available at URL
93       http://ngwww.ucar.edu/ngdoc/ng/ngmath/fitgrid/fithome.html
94
96       Copyright (C) 2000
97       University Corporation for Atmospheric Research
98
99       The use of this Software is governed by a License Agreement.
100
101
102
103UNIX                              March 1998                c_ftcurvps(3NCARG)
Impressum