MATLAB: How to find index with findpeaks

findfindpeaks

I have the following line:
A = findpeaks([75 45 12 94 60 34 30 51 85 95 85 55 53 53 63 28 53 34 28 38], 'MinPeakHeight', 50)
I want to know the indices of A (output of findpeaks). How to find them?

Best Answer

findpeaks has a second output argument with the indices:
[A,idx] = findpeaks(...)
Related Question