User`s guide
3 Fitting Data
3-68
Nonparametric Fitting
In some cases, you are not concerned about extracting or interpreting fitted
parameters. Instead, you might simply want to draw a smooth curve through
your data. Fitting of this type is called nonparametric fitting. The Curve Fitting
Toolbox supports these nonparametric fitting methods:
• Interpolants — Estimate values that lie between known data points.
• Smoothing spline — Create a smooth curve through the data. You adjust the
level of smoothness by varying a parameter that changes the curve from a
least squares straight-line approximation to a cubic spline interpolant.
For more information about interpolation, refer to “Polynomials and
Interpolation” and the
interp1 function in the MATLAB documentation. For
more information about smoothing splines, refer to “Tutorial” and the
csaps
function in the Spline Toolbox documentation.
Interpolants
Interpolation is a process for estimating values that lie between known data
points. The supported interpolant methods are shown below.
Table 3-6: Interpolant Methods
Method Description
Linear Linear interpolation. This method fits a different
linear polynomial between each pair of data points.
Nearest neighbor Nearest neighbor interpolation. This method sets the
value of an interpolated point to the value of the
nearest data point. Therefore, this method does not
generate any new data points.
Cubic spline Cubic spline interpolation. This method fits a different
cubic polynomial between each pair of data points.
Shape-preserving Piecewise cubic Hermite interpolation (PCHIP). This
method preserves monotonicity and the shape of the
data.