Function File: pp = csape (x, y, cond, valc)

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:

’complete’

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)

’not-a-knot’

third derivatives are continuous at the second and second last point

’periodic’

match first and second derivative of first and last point

’second’

match second derivative at first and last point as given in valc

’variational’

set second derivative at first and last point to zero (natural cubic spline)

See also: ppval, spline.

Package: splines