spline
compute a natural spline
Calling Sequence
Parameters
Description
Examples
spline(X, Y, z, d)
X, Y
-
two vectors or two lists
z
name
d
(optional) positive integer or name
Important: The spline function has been deprecated. Use the superseding function CurveFitting[Spline] instead. A call to spline automatically generates a call to CurveFitting[Spline].
The spline function computes a piecewise polynomial approximation to the X Y data values of degree d (default 3) in the variable z. The X values must be distinct and in ascending order. There are no conditions on the Y values. The result is returned in the form
which is equivalent to
if then elif then ... else end if
where the segment polynomials are of degree .
The segment polynomials are uniquely given by the following conditions
interpolating conditions and,
continuity conditions,
additional conditions, , and, .
The last two conditions give rise to what are called the ``natural splines''. For example, for cubic splines, with , we obtain the two conditions
The fourth optional argument must be a positive integer (default 3) or one of the keywords linear, quadratic, cubic, or quartic. It specifies the degree of the segment polynomials.
See Also
CurveFitting
CurveFitting[Spline]
piecewise
Download Help Document