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

20 visualizaciones (últimos 30 días)
Subhajit
Subhajit el 29 de En. de 2014
Comentada: LR el 26 de Sept. de 2020
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 comentarios
LR
LR el 26 de Sept. de 2020
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?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Interpolation en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by