Mathematica and Splines

Well, I hope you learned something from all this, because what I tell you now might just tick you off a bit: Mathematica can do all this and more! To see all the details, read 3.8 (beginning on page 672) of Wolfram's Mathematica book and pages 357-358 of the Guide to Standard Packages .

You need the following package. By the way, this works even if your data is not one to one, that is, if for some x you have more than one u. For this reason, the SplineFit command returns a parametric function and to plot it you must use ParametricPlot instead of Plot. The option Compiled->False is for convenience.


  <<NumericalMath`SplineFit`


  ?SplineFit

The spline curve is a parametric curve; you enter a parameter within the range of the parametrization and the output is the (x,y) pair at that parameter value.

Examples

Up to Interpolation and Splines (Curve Fitting)