MATLAB: How to detect peaks above a given threshold value

digital signal processingsignalSignal Processing Toolbox

findpeaks() can detect multiple peaks if there is/are change in direction(s) even if the values are above the specified threshold (see arrows in the attached pdf file).
J=a vector;
findpeaks(J,'MinPeakHeight',Threshold);hold on;
yline(Threshold,'--','LineWidth',3);
hold off

Best Answer

Hi Sudip.
The function 'findpeaks' can take several input arguments for finding peaks according to criteria. You can use multiple arguments to adjust your peak finding algorithm. I will suggest you to read the description of 'findpeaks'. ('https://www.mathworks.com/help/signal/ref/findpeaks.html').
Another way is to apply a filter to smoothen the signal and then apply 'findpeaks'.
Related Question