how to find FWHM in histogram
조회 수: 30 (최근 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
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.
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Histograms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!