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
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 CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by