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

NAME

6       CURVS - calculate values for a smoothing spline
7

SYNOPSIS

9       CALL CURVS (N, X, Y, D, ISW, S, EPS, YS, YSP, SIGMA, TEMP, IER)
10
11       This  subroutine  calculates  certain  values that are used by CURV2 in
12       order to  compute  an  interpolatory  smoothing  spline  under  tension
13       through  a sequence of functional values. The actual computation of the
14       interpolated values must be done using CURV2.
15
16       Three parameters are used to control the degree of smoothness -- D,  S,
17       and EPS.
18
19       The  parameter  D is a value indicating the degree of confidence in the
20       accuracy of the input function values -- it should be an  approximation
21       of the standard deviation of error. Effectively the value of D controls
22       how close the smoothed curve comes to the input data points.  If  D  is
23       small  then  the  interpolated curve will pass close to the input data.
24       The larger the value of D, the more freedom the smooth curve has in how
25       close it comes to the input data values.
26
27       S  is a more subtle global smoothing parameter. S must be non-negative.
28       For small values of S, the interpolated curve approximates the  tension
29       spline  and for larger values of S, the curve is smoother. A reasonable
30       value for S is REAL(N).
31
32       EPS controls the precision to which  S  is  interpreted;  EPS  must  be
33       between   0.   and  1.   inclusive.  A  reasonable  value  for  EPS  is
34       SQRT(2./REAL(N)).
35

DESCRIPTION

37       N           (integer, input) The number of input data values. (N > 1)
38
39       X           (integer, input) An array containing the abscissae for  the
40                   input function.  These must be increasing values.
41
42       Y           (integer,  input) An array containing the functional values
43                   for the input function -- Y(K) is the functional  value  at
44                   X(K) for K=1,N.
45
46       D           (integer,  input)  A  user-specified  value  containing the
47                   observed weights. D may be either an  array  or  a  scalar,
48                   depending on the value of ISW (as described below).
49
50       ISW         (integer,  input) A switch for interpreting the value of D.
51                   If ISW=0, then D is an array of length  N  (D  contains  an
52                   individual  error  estimate  for each input data value); if
53                   ISW=1, then D is a scalar that serves as an error  estimate
54                   for every single data item.
55
56       S           (integer,  input)  Contains the value for smoothing. S must
57                   be non-negative.  Larger values for S yield greater smooth‐
58                   ing. A reasonable value is REAL(N).
59
60       EPS         (integer,  input)  Contains a tolerance value for the rela‐
61                   tive precision to which S should be interpreted.  EPS  must
62                   be  between  0.  and  1.  inclusive.  A reasonable value is
63                   SQRT(2./REAL(N)).
64
65       YS          (integer, input) An array of length N.
66
67       YSP         (integer, input) An array of length N.
68
69       SIGMA       (integer, input) Tension factor. Values near zero result in
70                   a  cubic  spline; large values (e.g. 50) result in nearly a
71                   polygonal line. A typical value is 1.
72
73       TEMP        (integer, input) Scratch space.
74
75       IER         (integer,  output)  An  error  return  value.   If  IER  is
76                   returned as 0, then no errors were detected.
77
78                   = 1 if N is less than 2.
79                   = 2 if S is negative.
80                   = 3 if EPS is negative or greater than 1.
81                   = 4 if X values are not strictly increasing.
82                   = 5 if D is negative.
83

ACCESS

85       To use CURVS, load the NCAR Graphics library ngmath.
86

SEE ALSO

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