hi,i need to find peakvalues and its indices.

1 view (last 30 days)
eg
u=[25 8 15 5 6 10 10 3 1 20 7];
n=findpeaks(u)
n =
15 10 20
if i use find(u==n) i get error as matrix dimension mismatch

Accepted Answer

Walter Roberson
Walter Roberson on 2 Sep 2015
u=[25 8 15 5 6 10 10 3 1 20 7];
[n, locs] = findpeaks(u)

More Answers (0)

Categories

Find more on Images in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!