Selecting numbers in matrix that are repeated
Afficher commentaires plus anciens
I have a 60x5 matrix A and would like to find the answer vector that lists all the numbers in A that appeared at least 2 times/remove those numbers that only appeared once. How may I write for this?
(A contains some NaNs too)
Thank you! :)
Réponse acceptée
Plus de réponses (1)
KALYAN ACHARJYA
le 1 Déc 2019
[N,edges]=histcounts(A,unique(A))
result_array=edges(N>1)
1 commentaire
Cside
le 1 Déc 2019
Catégories
En savoir plus sur Logical 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!