Peak Width at Half Height
古いコメントを表示
I started using MATLAB only a few days ago. And I have trouble finding the width of peak. I have two subplots, both of which represent one peak from the data only. I want to know the width of peak at half distance. I also want the line representing width to be displayed on the plot. Please tell me how this can be done.
I searched the internet for help but could not get the desired result.
Here is my code for both graphs:
subplot(2,1,1)
plot(Hwave,Hintense,'.'),title('Original data'),xlabel('Wavelength'),ylabel('Intensity')
axis tight, grid
subplot(2,1,2)
plot(Hwaveinter,Hreal,'.'),title('Eight Times Interpolated Data'),xlabel('Wavelength'),ylabel('Intensity')
axis tight, grid
Thanks
3 件のコメント
Could we see an example curve or two? A simple approach would be shift the curve so its baseline is a y=0 find the peak using max(), find the corresponding y value at half the height of the peak, and then get the corresponding x values on each side of the curve where y equals half-height. But that simple approach may not work with some curves.
Laiba Qadeer
2020 年 3 月 10 日
Adam Danz
2020 年 3 月 10 日
Image Analyst's demo will work well with your data.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Creating, Deleting, and Querying Graphics Objects についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

