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

1 visualización (últimos 30 días)
Clebod
Clebod el 12 de Oct. de 2015
Comentada: Clebod el 12 de Oct. de 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

Respuestas (1)

Walter Roberson
Walter Roberson el 12 de Oct. de 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.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by