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!

