主要内容

线性和非线性回归

R2026b
用线性或非线性库模型或自定义模型进行曲线或曲面拟合

回归是一种估计一个响应(输出)变量和一个或多个预测变量(输入)变量之间关系的方法。您可以使用线性和非线性回归来预测、预报和估计观察到的数据点之间的值。Curve Fitting Toolbox™ 函数允许您通过使用线性和非线性模型库或自定义方程对数据进行曲线或曲面拟合来执行回归。

您可以使用曲线拟合器以交互方式对数据进行曲线和曲面拟合。有关详细信息,请参阅曲线拟合。您还可以在命令行中使用 fit 函数对一组数据进行曲线或曲面拟合。有关简单示例,请参阅多项式曲线拟合。

App

曲线拟合器对数据进行曲线和曲面拟合

函数

全部展开

excludedataExclude data from fit
fit对数据进行曲线或曲面拟合
fittype曲线和曲面拟合的拟合类型
fitoptions创建或修改拟合选项对象
prepareCurveData 为曲线拟合准备数据输入
prepareSurfaceData为曲面拟合准备数据输入
argnames cfit、sfit 或 fittype 对象的输入参量名称
categorycfit、sfit 或 fittype 对象的拟合类别
coeffnamescfit、sfit 或 fittype 对象的系数名称
coeffvaluescfit 或 sfit 对象的系数值
dependnamescfit、sfit 或 fittype 对象的因变量
feval评估 cfit、sfit 或 fittype 对象
formulacfit、sfit 或 fittype 对象的公式
getGet fit options structure property names and values
indepnamescfit、sfit 或 fittype 对象的自变量
islinear判断 cfit、sfit 或 fittype 对象是否为线性对象
numargscfit、sfit 或 fittype 对象的输入参量的数目
numcoeffscfit、sfit 或 fittype 对象的系数的数目
probnamescfit、sfit 或 fittype 对象的问题相关参数名称
setAssign values in fit options structure
setoptions 设置模型拟合选项
typecfit、sfit 或 fittype 对象的名称

主题

教程

  • 参数化拟合
    查找曲线拟合器和 fit 函数的所有库模型类型,设置拟合选项,并优化起点。
  • Introduction to Least-Squares Fitting
    Perform least-squares fitting by using error distributions and linear, weighted, robust, and nonlinear least squares.
  • Fit Polynomial Models
    Fit polynomials in the Curve Fitter app or with the fit function.
  • 拟合指数模型
    在曲线拟合器中或使用 fit 函数拟合指数模型。
  • Fit Logarithmic Models
    A logarithmic model has a steep initial period of growth before continuing to grow at a slower rate.
  • Fit Fourier Models
    Fit Fourier series models in the Curve Fitter app or with the fit function.
  • 拟合高斯模型
    在曲线拟合器中或使用 fit 函数拟合高斯模型。
  • 拟合幂级数模型
    在曲线拟合器中或使用 fit 函数进行幂级数模型拟合。
  • Fit Rational Models
    Fit rational polynomial models in the Curve Fitter app or with the fit function.
  • 拟合正弦和模型
    在曲线拟合器中或使用 fit 函数进行正弦和模型拟合。
  • Fit Weibull Distribution Models
    Fit Weibull distribution models in the Curve Fitter app or with the fit function.
  • Fit Sigmoidal Models
    Fit sigmoidal models in the Curve Fitter app or with the fit function.
  • Fit Custom Models
    If the Curve Fitting Toolbox library does not contain a desired parametric equation, you can create your own custom equation.
  • Fit Custom Linear Models
    In the Curve Fitter app, you can use the Custom Equation fit to define your own linear or nonlinear equations.

工具工作流

编程工作流

精选示例