Gaussian fit to xy data and extracting FWHM
Show older comments
Hello,
I am hoping someone could help. I am going round in circles although i'm sure it's a straightforward answer.
I have an xy data set (see attached for example). I want to fit a gaussian to this, from which the FWHM of the gaussian and the goodness of fit extracted (those that do not have good gaussian fits will be then rejected on the basis of r squared values.
I tried using cftool, and from what i have read, I can use FWHM= 2*sqrt(2*log(2))*c1 to get the FWHM. But the value I get (~30), doesn't match up to what i expect from looking at the curve at the half-maximum (~20).

Thankyou
Accepted Answer
More Answers (1)
Fynn Reinbacher
on 5 Nov 2020
0 votes
You can also obtain σ from a.
However one has to be careful.
More on that here:
Categories
Find more on Linear and Nonlinear Regression in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!