how to find FWHM in histogram

22 次查看(过去 30 天)
how can I evaluate the FWHM in a histogram with 2 peaks or more? I couldn'f find a built-in function...
thanks!
  2 个评论
Rik
Rik 2020-5-28
Since there isn't a builtin function, you will have to write one yourself.
I would suggest starting with finding the peak.
sani
sani 2020-5-28
Thenks, yes it will make it much easier

请先登录,再进行评论。

采纳的回答

Image Analyst
Image Analyst 2020-5-29
Try this (untested):
counts = histcounts(data);
maxCounts = max(counts);
leftBin = find(counts > maxCounts/2, 1, 'first')
rightBin = find(counts > maxCounts/2, 1, 'last')
fwhm = rightBin - leftBin; % Add 1 if you want, depending on how you define width.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Histograms 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by