logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

c_csa1s - cubic spline approximation, simple entry for one-dimensional input

Access

       To use c_csa1s, load the NCAR Graphics library ngmath.

Description

       n           (integer,input)  The  number  of  input data points. It must be that n is greater than 3 and,
                   depending on the size of knots below, n may have to be larger.

       xi          (real, input) An array dimensioned for n containing the abscissae for the input function.

       yi          (real, input) An array dimensioned for n  containing  the  functional  values  of  the  input
                   function -- yi[k] is the functional value at xi[k] for k=0,n-1.

       knots       (integer,  input)  The  number  of knots to be used in constructing the approximation spline.
                   knots must be at least 4. The larger the value for knots, the closer the  approximated  curve
                   will come to passing through the input function values.

       m           (integer, input) The number of values to be calculated for the output curve.

       xo          (real, input) An array dimensioned for m containing the X coordinates of the output curve.

       ier         (pointer  to integer, output) An error return value. If *ier is returned as 0, then no errors
                   were detected. If *ier is non-zero, then refer to the error  list  in  the  error  table  for
                   details.

Function Prototype

       float *c_csa1s(int, float [], float [], int, int, float [], int *);

Name

       c_csa1s - cubic spline approximation, simple entry for one-dimensional input

See Also

       csagrid, c_csa1xs, c_csa1ls, c_csa1lxs

       Complete documentation for Csagrid is available at URL
       http://ngwww.ucar.edu/ngdoc/ng/ngmath/csagrid/csahome.html

Synopsis

       float *c_csa1s(int n, float xi[], float yi[], int knots,
                   int m, float xo[], int *ier);

Usage

       c_csa1s  is  called  to find an approximating cubic spline for one-dimensional input data. If you want to
       weight the input data values, calculate derivatives, or handle data sparse areas specially, then you will
       need to use c_csa1xs.

       c_csa1s returns a pointer to a linear array of data that is the approximated curve.

See Also