How to local maxima of a matrix, row by row ?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello everybody!
I want to extract local maxima of my matrix "LSup" (74x101)row by row (1 row = 1 subject)
I used findpeaks but for the moment it doesn't works because this function need a vector ...
my code is this :
for i=[1:74];
seuil=0.02;
[pks,locs] = findpeaks(LSup(i,:),'THRESHOLD',seuil);
end
Thank you for your help
0 Kommentare
Antworten (1)
Walter Roberson
am 12 Okt. 2015
for i=[1:74];
seuil=0.02;
[pks{i},locs{i}] = findpeaks(LSup(i,:),'THRESHOLD',seuil);
end
A cell array is needed because there can be different numbers of peaks per row.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!