Selecting numbers in matrix that are repeated
Ältere Kommentare anzeigen
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! :)
Akzeptierte Antwort
Weitere Antworten (1)
KALYAN ACHARJYA
am 1 Dez. 2019
[N,edges]=histcounts(A,unique(A))
result_array=edges(N>1)
1 Kommentar
Cside
am 1 Dez. 2019
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!