| Contents | Index |
| On this page… |
|---|
You can work with splines in Curve Fitting Toolbox in several ways.
Using Curve Fitting Tool or the fit function you can:
Fit cubic spline interpolants to curves or surfaces
Fit smoothing splines and shape-preserving cubic spline interpolants to curves (but not surfaces)
The toolbox also contains specific splines functions to allow greater control over what you can create. For example, you can use the csapi function for cubic spline interpolation. Why would you use csapi instead of the fit function 'cubicinterp' option? You might require greater flexibility to work with splines for the following reasons:
You want to combine the results with other splines, e.g., by addition.
You want vector-valued splines. You can use csapi with scalars, vectors, matrices, and ND-arrays. The fit function only allows scalar-valued splines.
You want other types of splines such as ppform, B-form, tensor-product, rational, and stform thin-plate splines.
You want to create splines without data.
You want to specify breaks, optimize knot placement, and use specialized functions for spline manipulation such as differentiation and integration.
If you require specialized spline functions, see the following sections for interactive and programmatic spline fitting.
You can access all spline functions from the splinetool GUI.
See Introducing Spline Fitting.
To programmatically fit splines, see:
Guide to Spline Fitting for descriptions of types of splines and numerous examples.
![]() | Surface Fitting | Interactive Fitting | ![]() |
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |