Spline Toolbox    

Cubic Spline Interpolation

Suppose you want to interpolate to some smooth data, e.g., to

Then you could try the cubic spline interpolant obtained by

and plotted, along with the data, by

This produces a figure like the following.

Figure 2-1: Cubic Spline Interpolant to Some Smooth Data

This is, more precisely, the cubic spline interpolant with the not-a-knot end conditions, meaning that it is the unique piecewise cubic polynomial with two continuous derivatives with breaks at all interior data sites except for the leftmost and the rightmost one. It is the same interpolant as produced by the MATLAB spline command, spline(x,y).


  Some Simple Examples Periodic Data