Spline Toolbox | ![]() ![]() |
Splines in MATLAB
MATLAB provides spline approximation via the command spline
. If called in the form cs =
spline
(x,y)
, it returns the ppform of the cubic spline with break sequence x
that takes the value y(i)
at x(i)
, all i
, and satisfies the not-a-knot end condition. In other words, the command cs = spline(x,y)
gives the same result as the command cs =
csapi
(x,y)
available in the Spline Toolbox. But only the latter also works when x
,y
describe multivariate gridded data. In MATLAB, cubic spline interpolation to multivariate gridded data is provided by the command interpn
(x1,...,xd,v,y1,...,yd,'spline')
which returns values of the interpolating tensor product cubic spline at the grid specified by y1
,...,yd
.
Further, any of the fn...
commands of the Spline Toolbox can be applied to the output of the MATLAB spline(x,y)
command, with simple versions of the Spline Toolbox commands fnval
, ppmak
, fnbrk
available directly in MATLAB, as the commands ppval
, mkpp
, unmkpp
, respectively.
![]() | New Features in Version 3.1.1 | Expected Background | ![]() |