how to find FWHM in histogram

조회 수: 34 (최근 30일)
sani 2020년 5월 28일
답변: Image Analyst 2020년 5월 29일
how can I evaluate the FWHM in a histogram with 2 peaks or more? I couldn'f find a built-in function...
  댓글 수: 2
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 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