How to local maxima of a matrix, row by row ?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
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.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!