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

NAME

6       c_csa2ls - cubic spline approximation, simple entry for two-dimensional
7       input, list output
8

FUNCTION PROTOTYPE

10       float *c_csa2ls(int, float [], float [], float [], int [],
11                       int, float [], float [], int *);
12
13

SYNOPSIS

15       int c_csa2ls(int n, float xi[], float yi[], float zi[], int knots[2],
16                   int no, float xo[], float yo[], int *ier);
17
18

DESCRIPTION

20       n           (integer,input) The number of input data points. It must be
21                   that  n  is  greater  than  3 and, depending on the size of
22                   knots below, n may have to be larger.
23
24       xi          (real, input) An array dimensioned for n containing  the  X
25                   coordinate values for the input function.
26
27       yi          (real,  input)  An array dimensioned for n containing the Y
28                   coordinate values for the input function.
29
30       zi          (real, input) An array containing the functional values  of
31                   the  input  function  --  zi[k]  is the functional value at
32                   (xi[k], yi[k]) for k=0,n-1.
33
34       knots       (integer, input) The number of knots to  be  used  in  con‐
35                   structing  the approximation spline.  knots[0] and knots[1]
36                   must be at least 4. The larger the  value  for  knots,  the
37                   closer  the approximated curve will come to passing through
38                   the input function values.
39
40       no          (integer, input) The number of X - Y coordinate  values  to
41                   be calculated for the output array.
42
43       xo          (real,  input) An array dimensioned for no containing the X
44                   coordinates of the output list.
45
46       yo          (real, output) An array dimensioned for no containing the Y
47                   coordinates of the output list.
48
49       ier         (pointer to integer, output) An error return value. If *ier
50                   is returned as 0, then no errors were detected. If *ier  is
51                   non-zero,  then  refer to the error list in the error table
52                   for details.
53

USAGE

55       c_csa2ls is called to find values of an approximating cubic  spline  at
56       specified  two-dimensional coordinates. If you want to weight the input
57       data values, calculate derivatives, or handle data  sparse  areas  spe‐
58       cially, then you will need to use c_csa2lxs.
59
60       c_csa2ls  returns a pointer to a linear array of data that contains the
61       approximated values calculated at the input list of coordinate  values.
62       That is, if out is declared as
63
64         float *out;
65
66       and we set:
67
68         out = c_csa2ls(n, x, y, z, knots, no, xo, yo, &ier);
69
70       then  out[i]  is  the  approximated  function value at coordinate point
71       (xo[i], yo[i]) for 0 <= i < no. The space for out is allocated internal
72       to c_csa2ls and is no floats in size.
73

ACCESS

75       To use c_csa2ls, load the NCAR Graphics library ngmath.
76

SEE ALSO

78       csagrid, c_csa2s, c_csa2xs, c_csa2lxs
79
80       Complete documentation for Csagrid is available at URL
81       http://ngwww.ucar.edu/ngdoc/ng/ngmath/csagrid/csahome.html
82
84       Copyright (C) 2000
85       University Corporation for Atmospheric Research
86
87       The use of this Software is governed by a License Agreement.
88
89
90
91UNIX                             January 1999                 c_csa2ls(3NCARG)
Impressum