MATLAB: Find the width of various peaks on an intensity plot

peaks peakwidthSignal Processing Toolbox

Hi,
I am trying to find out a way to figure out how to find the width between two peaks. For example, I would like to know the width between the two peaks in blue and the two peaks in red. Unfortunately, when I use the findpeaks function to find the locations, and then find the difference between the locations, it will give me the width of the adjacent peaks (what is represented as the black distance in this plot).
Any help helps!
Thank you!

Best Answer

You can use findpeaks() in the Signal Processing Toolbox. You might want to make it really sensitive to find all the little peaks and then use them to find whatever distances you dream up.
Related Question