Products & Services Solutions Academia Support User Community Company

Learn more about Spline Toolbox   

MATLAB Splines

The MATLAB technical computing environment 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 product. 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 Spline Toolbox fn... commands 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.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS