Student[NumericalAnalysis][CubicSpline] - perform cubic spline interpolation on a set of data
|
Calling Sequence
|
|
CubicSpline(xy, opts)
|
|
Parameters
|
|
xy
|
-
|
listlist; data points, in the form [[x_1,y_1],[x_2, y_2],...], to be interpolated
|
opts
|
-
|
(optional) equations of the form keyword=value where keyword is one of: boundaryconditions, digits, extrapolate, function, independentvar; the options for interpolating the data xy
|
|
|
|
|
Description
|
|
•
|
The CubicSpline command interpolates the given data points xy using the cubic spline method and stores all computed information in a POLYINTERP structure.
|
•
|
The POLYINTERP structure is then passed around to different interpolation commands in the Student[NumericalAnalysis] subpackage where information can be extracted from it and, depending on the command, manipulated.
|
|
|
Options
|
|
•
|
boundaryconditions = natural, clamped(numeric, numeric)
|
|
The boundary conditions. The boundary conditions can either be natural or clamped(u,v), where u and v are the first derivative boundary conditions. By default, boundaryconditions = natural.
|
|
A positive integer; the environment variable Digits will be set to this integer during the execution of this procedure. By default, digits = 10.
|
•
|
extrapolate = algebraic, list(algebraic)
|
|
The points to be extrapolated. By default no points are extrapolated. To see the extrapolated values after using the CubicSpline command, use the ExactValue or ApproximateValue command.
|
|
The exact function to use when computing the absolute error. By default, no function is used.
|
|
The name to assign to the independent variable in the interpolant. If independentvar is not specified, the independent variable in the function option will be used. If function and independentvar are both unspecified, ind_var will be used as the independent variable in the interpolant.
|
|
|
Notes
|
|
•
|
This procedure operates numerically; that is, inputs that are not numeric are first evaluated to floating-point numbers before computations proceed.
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
>
|
|
>
|
|
| (2) |
>
|
|
>
|
|
>
|
|
|
|