How to local maxima of a matrix, row by row ?

1 Ansicht (letzte 30 Tage)
Clebod
Clebod am 12 Okt. 2015
Kommentiert: Clebod am 12 Okt. 2015
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

Antworten (1)

Walter Roberson
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.

Community Treasure Hunt

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

Start Hunting!

Translated by