What is formulae used to calculate gaussian fit coefficients by matlab ?

20 ビュー (過去 30 日間)
Subhajit
Subhajit 2014 年 1 月 29 日
コメント済み: LR 2020 年 9 月 26 日
Hi All,
I have two arrays
a = [ 1,2,3,4,5,6,7,8,9 ]; b = [ 1,2,3,4,5,4,3,2,1 ]; I do f = fit( a,b, 'gauss1' );
The result is f =
General model Gauss1:
f(x) = a1*exp(-((x-b1)/c1)^2)
Coefficients (with 95% confidence bounds):
a1 = 4.611 (4.29, 4.932)
b1 = 5 (4.819, 5.181)
c1 = 3.194 (2.916, 3.472)
I understand b1 is mean and it is calculated as b1 = (sum( a.*b))/sum( b) But I am not able to understand how the values of c1 and a1 are generated. The common practice of getting standard deviation for c1 doesn't work.
Can anyone please tell me how this is addressed in matlab , what concept is used to get these values for the corresponding gauss1 fit.
Regards Subhajit
  3 件のコメント
Alan Stevens
Alan Stevens 2020 年 9 月 11 日
LR
LR 2020 年 9 月 26 日
I've been struggling with this too, and I still don't quite understand it. I've been trying to calculate the mean and standard deviation of a fitted Gaussian using the same formulae as above, but it just doesn't add up. In this case you can see that a1 gives sigma = 0.0865 and c1 gives sigma = 2.2585. Do you guys understand why this may be the case?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by