Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Cubic spline data interpolation

`s = spline(x,y,xq)`

`pp = spline(x,y)`

You also can perform spline interpolation using the

`interp1`

function with the command`interp1(x,y,xq,'spline')`

. While`spline`

performs interpolation on rows of an input matrix,`interp1`

performs interpolation on columns of an input matrix.

A tridiagonal linear system (possibly with several right-hand
sides) is solved for the information needed to describe the coefficients
of the various cubic polynomials that make up the interpolating spline. `spline`

uses
the functions `ppval`

, `mkpp`

,
and `unmkpp`

. These routines form a small suite
of functions for working with piecewise polynomials. For access to
more advanced features, see `interp1`

or
the Curve Fitting
Toolbox™ spline functions.

[1] de Boor, Carl. *A Practical
Guide to Splines*. Springer-Verlag, New York: 1978.

Was this topic helpful?