How to replace all elements of matrix with zero except some elements(localpeaks?
Afficher commentaires plus anciens
Hello,I have a matrix of data with size 1*256. I found local peaks using [pks loc]=findpeaks(hh2) ;now in my matrix i want to put zero instead of all elements except peaks that i found.can any one help me plz?
Réponses (1)
Christopher Davis
le 10 Fév 2016
I would try something like this:
x=1:length(hh2);
x(loc)=[];
hh2(x)=0;
1 commentaire
Fateme Jalali
le 10 Fév 2016
Catégories
En savoir plus sur Descriptive Statistics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!