Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Linear and Nonlinear Regression

Fit curves or surfaces with linear and nonlinear library models and custom models

Apps

Curve FittingFit curves and surfaces to data

Functions

fitFit curve or surface to data
fittypeFit type for curve and surface fitting
fitoptionsCreate or modify fit options object
prepareCurveData Prepare data inputs for curve fitting
prepareSurfaceDataPrepare data inputs for surface fitting
excludedataExclude data from fit
argnames Input argument names of cfit, sfit, or fittype object
categoryCategory of fit of cfit, sfit, or fittype object
coeffnamesCoefficient names of cfit, sfit, or fittype object
coeffvaluesCoefficient values of cfit or sfit object
dependnamesDependent variable of cfit, sfit, or fittype object
fevalEvaluate cfit, sfit, or fittype object
formulaFormula of cfit, sfit, or fittype object
getGet fit options structure property names and values
indepnamesIndependent variable of cfit, sfit, or fittype object
islinearDetermine if cfit, sfit, or fittype object is linear
numargsNumber of input arguments of cfit, sfit, or fittype object
numcoeffsNumber of coefficients of cfit, sfit, or fittype object
probnamesProblem-dependent parameter names of cfit, sfit, or fittype object
setAssign values in fit options structure
setoptions Set model fit options
typeName of cfit, sfit, or fittype object

Examples and How To

Tutorials

Polynomial Models

Fit polynomials in Curve Fitting app or with the fit function.

Exponential Models

Fit exponential models in Curve Fitting app or with the fit function.

Fourier Series

Fit Fourier series models in Curve Fitting app or with the fit function.

Gaussian Models

Fit Gaussian models in Curve Fitting app or with the fit function.

Power Series

Fit power series models in Curve Fitting app or with the fit function.

Rational Polynomials

Fit rational polynomial models in Curve Fitting app or with the fit function.

Sum of Sines Models

Fit sum of sines models in Curve Fitting app or with the fit function.

Weibull Distributions

Fit Weibull distribution models in Curve Fitting app or with the fit function.

Custom Models

If the toolbox library does not contain a desired parametric equation, you can create your own custom equation.

Tools Workflow

Interactive Curve and Surface Fitting

Fit curves and surfaces to data using Curve Fitting app: select data, choose model types, and save sessions.

Data Selection

Select data to fit curves and surfaces in Curve Fitting app, identify compatible size data and troubleshoot data problems.

Compare Fits in Curve Fitting App

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.

Surface Fitting to Franke Data

Create and compare surface fits in Curve Fitting 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.

Programmatic Workflow

Curve and Surface Fitting

Workflow for programmatic curve and surface fitting in Curve Fitting Toolbox.

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.

Concepts

Parametric Fitting

Find all library model types for Curve Fitting app and the fit function, set fit options and optimize starting points.

Least-Squares Fitting

Least-squares fitting in Curve Fitting Toolbox, including error distributions, linear, weighted, robust, and nonlinear least squares.

Was this topic helpful?