Regression is a method of estimating the relationship between a response (output) variable and one or more predictor (input) variables. You can use linear and nonlinear regression to predict, forecast, and estimate values between observed data points. Curve Fitting Toolbox™ functions allow you to perform regression by fitting a curve or surface to data using the library of linear and nonlinear models, or custom equations.
Use the Curve Fitting app to fit curves
and surfaces to data interactively. For more information, see Interactive Curve Fitting. You can also use the
fit function to fit a
curve or surface to a set of data at the command line. For a simple example,
see Polynomial Curve Fitting.
|Curve Fitting||Fit curves and surfaces to data|
| Input argument names of |
|Category of fit of |
|Coefficient names of |
|Coefficient values of |
|Dependent variable of |
|Formula of |
|Get fit options structure property names and values|
|Independent variable of |
|Determine if |
|Number of input arguments of |
|Number of coefficients of |
|Problem-dependent parameter names of |
|Assign values in fit options structure|
|Set model fit options|
|Name of |
Find all library model types for Curve Fitting app
fit function, set fit options and optimize
Least-squares fitting in Curve Fitting Toolbox, including error distributions, linear, weighted, robust, and nonlinear least squares.
Fit polynomials in Curve Fitting app or with the
Fit exponential models in Curve Fitting app or with
Fit Fourier series models in Curve Fitting app or
Fit Gaussian models in Curve Fitting app or with the
Fit power series models in Curve Fitting app or with
Fit rational polynomial models in Curve Fitting app
or with the
Fit sum of sines models in Curve Fitting app or with
Fit Weibull distribution models in Curve Fitting app
or with the
If the toolbox library does not contain a desired parametric equation, you can create your own custom equation.
Fit curves and surfaces to data using Curve Fitting app: select data, choose model types, and save sessions.
Select data to fit curves and surfaces in Curve Fitting app, identify compatible size data and troubleshoot data problems.
Search for the best fit by creating multiple fits, comparing graphical and numerical results including fitted coefficients and goodness-of-fit statistics, and analyzing your best fit in the workspace.
Create and compare surface fits in Curve Fitting app using example data.
Curve Fitting Toolbox software provides some example data for an anesthesia drug interaction study.
This example fits the ENSO data using several custom nonlinear equations.
This example fits two poorly resolved Gaussian peaks on a decaying exponential background using a general (nonlinear) custom model.
Workflow for programmatic curve and surface fitting in Curve Fitting Toolbox.
This example shows how to fit polynomials up to sixth degree to some census data using Curve Fitting Toolbox™.
This example shows how to fit a custom equation to census data, specifying bounds, coefficients, and a problem-dependent parameter.
This example shows how to use Curve Fitting Toolbox™ to fit response surfaces to some anesthesia data to analyze drug interaction effects.