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(`

installs a new table of
x and y coordinates to interpolate in. `xtab`, `ytab`, /keep)

and
`xtab`

must have the same number of elements. The elements
of `ytab`

must be in ascending order with no duplicates.
Because of `xtab``/keep`

, the table is remembered for future use.

If `/periodic`

is specified, then the data is periodic. Then the
first and last

values must be equal, or else a
discontinuity shows up.
`ytab`

If `/akima`

is specified, then Akima splines are used instead of
cubic splines.

`cspline(`

interpolates at x
coordinates `xtab`, `ytab`, `xnew`)

in the table defined by
`xnew`

and `xtab`

. `ytab`

may be a
scalar or an array. If `xnew``/keep`

is specified, too, then the table
is remembered for future use.

`cspline(`

interpolates at x coordinates
`xnew`)

in the table installed earlier.
`xnew`

If `/getderivative`

is specified, then instead of the value the
derivative is returned.

`cspline(`

and `xtab`, `ytab`, `a`, `b`, /getintegral)`cspline(`

and
`xtab`, `ytab`, `a`, `b`)`cspline(`

return the integral of
the interpolated curve between x coordinates `a`, `b`, /getintegral)

and
`a`

. `b`

and `a`

must have the same
number of elements.
`b`

`cspline(`

and
`xtab`, `ytab`, `xnew`, /getintegral)`csplne(`

return the integral of the
interpolated curve between the smallest x coordinate in the table and
`xnew`, /getintegral)

.
`xnew`

See also: cspline_extr, cspline_find, polate, table, tense, tense_curve, tense_loop