.TL
spline: Cubic Spline Approximation
.CS
spline(x, y, n, periodic, boundary, xmin, xmax)
.PP
.AG x,y
x and y coordinates of points on a function to be approximated.
This argument may be a plot structure containing components named `x' and `y'.
The fitted values will always go through these points exactly.
.AG n
desired (approximate) number of output points.  Default `3*len(x)'.
The number of output points will always be at least `len(x)'.
.AG periodic
logical, default FALSE, is the function periodic?
If TRUE, the `y'-values at `min(x)' and `max(x)' should agree
and the output will have derivatives matched at these end points.
.AG boundary
Constant used in boundary value computation.  The second derivative of the
output function at the end points will be `boundary' times the second derivative
at the adjacent point.
Default 0.
.AG xmin,xmax
There will be approximately `n' output `x' values spaced in approximately
equal increments from `xmin' to `xmax'.
Default `min(x)', `max(x)'.
.RT
Plot structure containing components named `x' and `y' with the results
of the cubic spline fitting.
The spline output has two continuous derivatives and goes exactly through the
input points.
.SH REFERENCE
The function was derived from the UNIX system command "spline", which
gives the following reference:
R. W. Hamming,
.ul
Numerical Methods for Scientists and Engineers,
2nd ed, pp 349ff.
.EX
lines(spline(myx,myy))	# draw smooth curve through data
.KW plot*
.KW dplot*
.KW smoothing
.WR
