Main Content

指数模型

关于指数模型

该工具箱提供了一个单一的单一指数模型,如

y = 一种 E. B. X y = 一种 E. B. X + C E. D. X

当数量的变化率与数量的初始量成比例时,通常使用指数。如果系数相关联B.和/或D.是消极的,y代表指数衰减。如果系数是积极的,yrepresents exponential growth.

例如,由单级指数描述了核素的单个放射性衰减模式。一种is interpreted as the initial number of nuclei,B.是腐烂的常量,X是时候了,y是特定时间经过后剩余核的数量。如果存在两种衰减模式,则必须使用双义指数模型。对于第二个衰减模式,您将另一个指数术语添加到模型中。

指数增长的实例包括治愈不可用的传染病,以及捕食,环境因素等增长的生物群体。

以交互式拟合指数模型

  1. 通过输入打开曲线拟合应用程序cftool.。或者,单击“应用”选项卡上的“曲线拟合”。

  2. In the Curve Fitting app, select curve data (x数据一种ndy数据那or justy数据反对指数)。

    Curve Fitting app creates the default curve fit,多项式

  3. 更改模型类型多项式幂数

您可以指定以下选项:

  • 选择一个或两个术语以适应E.Xp1orE.Xp2

    Look in theResultspane to see the model terms, the values of the coefficients, and the goodness-of-fit statistics.

  • (可选)点击Fit Options指定适合您的数据的系数启动值和约束界限,或更改算法设置。

    工具箱基于当前数据集计算指数适合的优化开始点。您可以覆盖起始点并在“拟合选项”对话框中指定自己的值。

    接下来显示单级指数的拟合选项。系数启动值和约束是人口普查数据。

    For an example specifying starting values appropriate to the data, see高斯配件与指数背景

    For more information on the settings, seeSpecifying Fit Options and Optimized Starting Points

使用拟合功能拟合指数模型

此示例显示如何使用指数模型来使用适合功能。

The exponential library model is an input argument to the适合一种nd适合type职能。指定模型类型'exp1'or'exp2'

适合单一指数模型

Generate data with an exponential trend and then fit the data using a single-term exponential. Plot the fit and data.

X=(0:0.2:5)'; y = 2*exp(-0.2*x) + 0.1*randn(size(x)); f = fit(x,y,'exp1'
f =普通模型exp1:f(x)= a * exp(b * x)系数(具有95%的置信度):a = 2.021(1.89,2.151)b = -0.1812(-0.2104,-0.152)
plot(f,x,y)

适合双重指数模型

F2 = fit(x,y,'exp2'
F2 =通用模型EXP2:F2(x)= a * exp(b * x)+ c * exp(d * x)系数(具有95%的置信度):a = 2443(-1.229e + 12,1.229e +12)B = -0.2574(-1.87e + 04,1.87e + 04)c = -2441(-1.229e + 12,1.229e + 12)d = -0.2575(-1.872e + 04,1.872e + 04)
plot(f2,x,y)

Set Start Points

工具箱计算基于当前数据集的指数适合的优化起始点。您可以覆盖起始点并指定自己的值。

找到第一个模型中系数条目的顺序(F)B.yusing theCoeffnames.功能。

Coeffnames(f)
ans =.2x1细胞{'a'} {'b'}

如果指定开始点,请选择适合您的数据的值。为系数设置任意启动点一种一种ndB.例如目的。

f = fit(x,y,'exp1''起点'那[1,2])
f =普通模型exp1:f(x)= a * exp(b * x)系数(具有95%的置信度):a = 2.021(1.89,2.151)b = -0.1812(-0.2104,-0.152)
plot(f,x,y)

检查指数拟合选项

检查适合选择如果你想修改options such as coefficient starting values and constraint bounds appropriate for your data, or change algorithm settings. For details on these options, see the table of properties for NonlinearLeastSquares on the适合optionsreference page.

适合options('exp1'
ANS = NORMEIDE:'OFF'排除:[]权重:[]方法:'非线性半角'鲁棒:'OFF'开始点:[1x0 double]下部:[1x0 double] upper:[1x0 double]算法:'信任区域'Diffminchange:1.0000E-08 DiffMaxChange:0.1000显示:“通知”MaxFunevals:600 MAXITER:400 TOLFUN:1.0000E-06 TOLX:1.0000E-06

也可以看看

||

Related Topics