Next: cspline_extr, Previous: crunchrun, Up: Internal Routines [Contents][Index]
cspline( [ xtab, ytab] [, xnew [, xnew2]
] [, /keep, /periodic, /akima, /getderivative, /getintegral])
Interpolates using splines.
cspline()
clears the installed table of x and y coordinates.
cspline(xtab, ytab, /keep)
installs a new table of
x and y coordinates to interpolate in. xtab
and
ytab
must have the same number of elements. The elements
of xtab
must be in ascending order with no duplicates.
Because of /keep
, the table is remembered for future use.
If /periodic
is specified, then the data is periodic. Then the
first and last ytab
values must be equal, or else a
discontinuity shows up.
If /akima
is specified, then Akima splines are used instead of
cubic splines.
cspline(xtab, ytab, xnew)
interpolates at x
coordinates xnew
in the table defined by
xtab
and ytab
. xnew
may be a
scalar or an array. If /keep
is specified, too, then the table
is remembered for future use.
cspline(xnew)
interpolates at x coordinates
xnew
in the table installed earlier.
If /getderivative
is specified, then instead of the value the
derivative is returned.
cspline(xtab, ytab, a, b, /getintegral)
and cspline(xtab, ytab, a, b)
and
cspline(a, b, /getintegral)
return the integral of
the interpolated curve between x coordinates a
and
b
. a
and b
must have the same
number of elements.
cspline(xtab, ytab, xnew, /getintegral)
and
csplne(xnew, /getintegral)
return the integral of the
interpolated curve between the smallest x coordinate in the table and
xnew
.
See also: cspline_extr, cspline_find, polate, table, tense, tense_curve, tense_loop