How to replace some elements of matrix with zero
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello,I have a matrix of data with size 1*256 called hh2. I found local peaks using [pks loc]=findpeaks(hh2);Now in my matrix I want to put zero instead of all elements except local peaks that I found.can any one help me plz?
[pks,loc] = findpeaks(hh2);
0 commentaires
Réponses (1)
the cyclist
le 10 Fév 2016
notPeakLoc = setxor(loc,1:256);
hh2(notPeakLoc) = 0;
2 commentaires
Image Analyst
le 10 Fév 2016
Maybe you could Vote for and Accept his answer to give him "credit" (reputation points) for it.
Voir également
Catégories
En savoir plus sur Discrete Data Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!