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

NAME

6       c_csa2lxs  -  cubic spline approximation, expanded entry for two-dimen‐
7       sional input, list output
8

FUNCTION PROTOTYPE

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

SYNOPSIS

15       int c_csa2lxs(int n, float xi[], float yi[], float zi[],
16                     float wts[], int knots[2], float smth, int nderiv[2],
17                     int no, float xo[], float yo[], int *ier);
18
19

DESCRIPTION

21       n           (integer, input) The number of input data points.  It  must
22                   be  that  n is greater than 3 and, depending on the size of
23                   knots below, n may have to be larger.
24
25       xi          (real, input) An array dimensioned for n containing  the  X
26                   coordinate values for the input function.
27
28       yi          (real,  input)  An array dimensioned for n containing the Y
29                   coordinate values for the input function.
30
31       zi          (real, input) An array containing the functional values  of
32                   the  input  function  --  zi[k]  is the functional value at
33                   (xi[k], yi[k]) for k=0,n-1.
34
35       wts         (real, input) An array containing weights for the zi values
36                   at  the input xi and yi values, that is, wts[l] is a weight
37                   for the value of zi[l] for l=0,n-1. If you do not desire to
38                   weight  the  input  zi  values,  then set wts[0] to -1. The
39                   weights in the wts array are relative and may be set to any
40                   non-negative  value.  When c_csa2lxs is called, the weights
41                   are summed and the individual  weights  are  normalized  so
42                   that the weight sum is unity.
43
44       knots       (integer,  input)  The  number  of knots to be used in con‐
45                   structing the approximation spline.  knots[0] and  knots[1]
46                   must  be  at  least  4. The larger the value for knots, the
47                   closer the approximated curve will come to passing  through
48                   the input function values.
49
50       smth        (real,  input) A parameter that controls extrapolation into
51                   data sparse regions. If smth is zero, then nothing  special
52                   is  done  in  data  sparse regions. A good first choice for
53                   smth is 1.
54
55       nderiv      (integer, input) For each of the two coordinate  direction,
56                   specifies  whether  you  want functional values (nderiv=0),
57                   first derivative values (nderiv=1),  or  second  derivative
58                   values   (nderiv=2).   For   example,  if  nderiv[0]=1  and
59                   nderiv[1]=1, then the second order mixed partial  would  be
60                   computed.
61
62       no          (integer,  input)  The number of X - Y coordinate values to
63                   be calculated for the output array.
64
65       xo          (real, input) An array dimensioned for no containing the  X
66                   coordinates of the output list.
67
68       yo          (real, output) An array dimensioned for no containing the Y
69                   coordinates of the output list.
70
71       ier         (pointer to integer, output) An  error  return  value.   If
72                   *ier  is  returned  as  0, then no errors were detected. If
73                   *ier is non-zero, then refer to the error list in the error
74                   table for details.
75

USAGE

77       c_csa2lxs  is called to find values of an approximating cubic spline at
78       specified two-dimensional coordinates. If you want to weight the  input
79       data  values,  calculate  derivatives, or handle data sparse areas spe‐
80       cially, then you will need to use c_csa2lxs.
81
82       c_csa2lxs returns a pointer to a linear array of data that contains the
83       approximated  values calculated at the input list of coordinate values.
84       That is, if out is declared as
85
86         float *out;
87
88       and we set:
89
90         out = c_csa2lxs(n, x, y, z, wts, knots, smth, nderiv, no, xo, yo, &ier);
91
92       then out[i] is the approximated  function  value  at  coordinate  point
93       (xo[i], yo[i]) for 0 <= i < no. The space for out is allocated internal
94       to c_csa2lxs and is no floats in size.
95

ACCESS

97       To use c_csa2lxs, load the NCAR Graphics library ngmath.
98

SEE ALSO

100       csagrid, c_csa2s, c_csa2xs, c_csa2ls
101
102       Complete documentation for Csagrid is available at URL
103       http://ngwww.ucar.edu/ngdoc/ng/ngmath/csagrid/csahome.html
104
106       Copyright (C) 2000
107       University Corporation for Atmospheric Research
108
109       The use of this Software is governed by a License Agreement.
110
111
112
113UNIX                             January 1999                c_csa2lxs(3NCARG)
Impressum