Linear and Nonlinear Regression
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 Fitter app to fit curves
and surfaces to data interactively. For more information, see 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 Fitter||Fit curves and surfaces to data|
Work with Fits
| 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 |
- Parametric Fitting
Find all library model types for the Curve Fitter app and the
fitfunction, set fit options, and optimize starting points.
- Least-Squares Fitting
Perform least-squares fitting by using error distributions and linear, weighted, robust, and nonlinear least squares.
- Polynomial Models
Fit polynomials in the Curve Fitter app or with the
- Exponential Models
Fit exponential models in the Curve Fitter app or with the
- Fourier Series
Fit Fourier series models in the Curve Fitter app or with the
- Gaussian Models
Fit Gaussian models in the Curve Fitter app or with the
- Power Series
Fit power series models in the Curve Fitter app or with the
- Rational Polynomials
Fit rational polynomial models in the Curve Fitter app or with the
- Sum of Sines Models
Fit sum of sines models in the Curve Fitter app or with the
- Weibull Distributions
Fit Weibull distribution models in the Curve Fitter app or with the
- Custom Models
If the Curve Fitting Toolbox library does not contain a desired parametric equation, you can create your own custom equation.
- Custom Linear Fitting
In the Curve Fitter app, you can use the Custom Equation fit to define your own linear or nonlinear equations.
- Interactive Curve and Surface Fitting
Select data and model types to fit curves and surfaces by using the Curve Fitter app and then save your session.
- Data Selection
Select data to fit curves and surfaces in Curve Fitter app, identify compatible size data and troubleshoot data problems.
- Compare Fits in Curve Fitter App
Find the best fit by comparing visual and numeric results, including fitted coefficients and goodness-of-fit statistics.
- Surface Fitting to Franke Data
Create and compare surface fits in Curve Fitter app using example data.
- Surface Fitting to Biopharmaceutical Data
Curve Fitting Toolbox software provides some example data for an anesthesia drug interaction study.
- Custom Nonlinear ENSO Data Analysis
This example fits the ENSO data using several custom nonlinear equations.
- Gaussian Fitting with an Exponential Background
This example fits two poorly resolved Gaussian peaks on a decaying exponential background using a general (nonlinear) custom model.
- Curve and Surface Fitting
Workflow for programmatic curve and surface fitting in Curve Fitting Toolbox.
- List of Library Models for Curve and Surface Fitting
Find all Curve Fitting Toolbox library model names for programmatic data fitting with the
- Curve and Surface Fitting Objects and Object Functions
Learn how to create, access, and modify curve and surface fit objects.
- Polynomial Curve Fitting
This example shows how to fit polynomials up to sixth degree to some census data using Curve Fitting Toolbox.
- Custom Nonlinear Census Fitting
This example shows how to fit a custom equation to census data, specifying bounds, coefficients, and a problem-dependent parameter.
- Surface Fitting with Custom Equations to Biopharmaceutical Data
This example shows how to use Curve Fitting Toolbox™ to fit response surfaces to some anesthesia data to analyze drug interaction effects.