The following tables describe the library model types for curves and surfaces.
|Library Model Types for Curves|
Distribution models such as Weibull. See Weibull Distributions.
Exponential function and sum of two exponential functions. See Exponential Models.
Up to eight terms of Fourier series. See Fourier Series.
Sum of up to eight Gaussian models. See Gaussian Models.
Interpolating models, including linear, nearest neighbor, cubic spline, and shape-preserving cubic spline. See Nonparametric Fitting.
Polynomial models, up to degree nine. See Polynomial Models.
Power function and sum of two power functions. See Power Series.
Rational equation models, up to 5th degree/5th degree (i.e., up to degree 5 in both the numerator and the denominator). See Rational Polynomials.
Sum of up to eight sin functions. See Sum of Sines Models.
Cubic spline and smoothing spline models. See Nonparametric Fitting.
|Library Model Types for Surfaces|
Interpolating models, including linear, nearest neighbor, cubic spline, biharmonic, and thin-plate spline interpolation. See Interpolation Methods.
Lowess smoothing models. See Lowess Smoothing.
Polynomial models, up to degree five. See Polynomial Models.
To specify the model you want to fit, consult the following tables for a
model name to use as an input argument to the
fit function. For
example, to specify a quadratic curve with model name
f = fit(x, y, 'poly2')
|Examples of Polynomial Model Names for Curves||Equations|
|...etc., up to
For polynomial surfaces, model names are
i is the degree in
j is the
degree in y. The maximum for both
five. The degree of the polynomial is the maximum of
The degree of x in each term will be less than or
i, and the degree of
y in each term will be less than or equal to
j. See the following table for some
example model names and equations, of many potential examples.
|Examples of Polynomial Model Names for Surfaces||Equations|
|Distribution Model Names||Equations|
|Exponential Model Names||Equations|
|Fourier Series Model Names||Equations|
| ...etc., up to |
p = 2*pi/(max(xdata)-min(xdata)).
|Gaussian Model Names||Equations|
| ...etc., up to ||
|Power Model Names||Equations|
Rational models are polynomials over polynomials with the leading
coefficient of the denominator set to 1. Model names are
i is the degree of the numerator and
j is the degree of the denominator. The
degrees go up to five for both the numerator and the
|Examples of Rational Model Names||Equations|
|Sum of Sine Model Names||Equations|
|...etc., up to |
Spline models are supported for curve fitting, not for surface fitting.
|Spline Model Names||Description|
|Cubic interpolating spline|
|Type||Interpolant Model Names||Description|
|Curves and Surfaces||Linear interpolation|
|Nearest neighbor interpolation|
|Cubic spline interpolation|
|Curves only||Shape-preserving piecewise cubic Hermite (pchip) interpolation|
|Thin-plate spline interpolation|
Lowess models are supported for surface fitting, not for curve fitting.
|Lowess Model Names||Description|
|Local linear regression|
|Local quadratic regression|