The ordinary cubic spline simetimes makes unpleasant wiggles, for example, around an outlier, or around a step-like feature of the tabulated function (read the Akima sub-spline chapter in the lecture notes). Here is yet another attempt to reduce the wiggles by building a sub-spline.
Consider a data set {xi, yi}i=1,..,n which represents a tabulated function.
Implement a sub-spline of this data using the following algorithm:
Si(x)= yi +bi(x-xi) +ci(x-xi)2 +di(x-xi)3,
where for each interval the three coefficients bi, ci, di are determined by the three conditions,
Si(xi+1)=yi+1,
S'i(xi)=pi,
S'i(xi+1)=pi+1.