cubic spline interpolation
Suppose we are given data points such that
Then the function is called a cubic spline interpolation if there exists cubic polynomials with coefficients such that the following hold.
So we see that the cubic spline not only interpolates the data but matches the first and second derivatives at the knots. Notice, from the above definition, one is free to specify constraints on the endpoints. One common end point constraint is , which is called the natural spline. Other popular choices are the clamped cubic spline, parabolically terminated spline and curvature-adjusted spline. Cubic splines are frequently used in numerical analysis to fit data. Matlab uses the command spline to find cubic spline interpolations with not-a-knot end point conditions. For example, the following commands would find the cubic spline interpolation of the curve and plot the curve and the interpolation marked with o’s.
x = 0:2*pi; y = 4*cos(x)+1; xx = 0:.001:2*pi; yy = spline(x,y,xx); plot(x,y,'o',xx,yy)
|Title||cubic spline interpolation|
|Date of creation||2013-03-22 13:40:25|
|Last modified on||2013-03-22 13:40:25|
|Last modified by||yota (10184)|