【问题标题】:How to get the standard deviation from gaussian fitted curve in Matlab如何在Matlab中获得高斯拟合曲线的标准差
【发布时间】:2013-07-03 09:48:43
【问题描述】:

如何在 Matlab 中得到高斯拟合曲线的标准差?

这不是 fit 函数的输出。

代码:

[fy, god] = fit(xx, yy, 'gauss2');

输出:

>> fy

fy = 

     General model Gauss2:
     fy(x) =  a1*exp(-((x-b1)/c1)^2) + a2*exp(-((x-b2)/c2)^2)
     Coefficients (with 95% confidence bounds):
       a1 =    -0.09287  (-0.09414, -0.0916)
       b1 =        3805  (3805, 3806)
       c1 =        20.9  (19.8, 22.01)
       a2 =     -0.3454  (-0.3497, -0.3411)
       b2 =        3862  (3861, 3862)
       c2 =       19.32  (18.82, 19.82)
>> god

god = 

           sse: 2.7037e-04
       rsquare: 0.9995
           dfe: 55
    adjrsquare: 0.9994
          rmse: 0.0022

【问题讨论】:

    标签: matlab curve-fitting


    【解决方案1】:

    fy 的输出表明您正在拟合一个由两个高斯函数的线性组合组成的模型。模型的函数形式为:

    fy(x) =  a1*exp(-((x-b1)/c1)^2) + a2*exp(-((x-b2)/c2)^2)
    

    记住高斯被定义为:

    f(x) = exp(-(x-x0)^2/(2*s^2))      where: x0 is the mean, s is the std.dev.
    

    那么模型中每个高斯的标准差可以分别计算为:

    s1 = c1/sqrt(2)
    s2 = c2/sqrt(2)
    

    请参阅http://en.wikipedia.org/wiki/Gaussian_function 了解更多信息。

    【讨论】:

      猜你喜欢
      • 2016-07-24
      • 2021-10-14
      • 2017-11-12
      • 2018-12-10
      • 1970-01-01
      • 2012-06-12
      • 1970-01-01
      • 2018-03-19
      • 2020-12-14
      相关资源
      最近更新 更多