cubic spline interpolation with various end conditions. creates the pp-form of the cubic spline.
x should be n by 1, y should be n by m, valc should be 2 by m or 2 by 1
The following end conditions as given in cond are possible:
match slopes at first and last point as given in valc (default; if valc is not given, the slopes matched are those of the cubic polynomials that interpolate the first and last four points)
third derivatives are continuous at the second and second last point
match first and second derivative of first and last point
match second derivative at first and last point as given in valc
set second derivative at first and last point to zero (natural cubic spline)
See also: ppval, spline.
Package: splines