Finding max peaks and full width/half max for both curves in the given plot
Show older comments

Trying to find the peak values and full width/half max from the generated gaussian fit. I tried using findpeak (signal processing toolbox) but the documentation is not very clear on how I could use that in this instance.
Accepted Answer
More Answers (1)
Image Analyst
on 26 Jun 2023
0 votes
Does the curve fitter give you the equation of the curve? You should be able to figure it out. Just take each Gaussian and set the value equal to half the peak and compute the two 2 values.
(0.5 * a1) = a1 * exp(-((x - b1)/c1) ^2);
ln(0.5) = - ((x-b1)/c1) ^2
sqrt(-ln(0.5)) = (x-b1)/c1
(+/-)c1 * sqrt(-ln(0.5)) + b1 = x (both x1 for the -sqrt and x2 for the +sqrt)
3 Comments
Jacob Collins
on 26 Jun 2023
Jacob Collins
on 26 Jun 2023
Image Analyst
on 26 Jun 2023
OK, since you accepted @Star Strider's answer it looks like you really wanted the FWHM from the empirical raw data rather than "the generated gaussian fit" as you said originally. Hence, I'm not going to do anything more. Glad it's working for you.
Categories
Find more on Descriptive Statistics 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!


