Count unique vector in a sequence
19 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Marcus
le 14 Juil 2024 à 5:06
Commenté : Marcus
le 14 Juil 2024 à 22:08
Hello,
I have a sequence of 16 column vectors v_n with dimension 4x1: [ v_1 v_2 ... v_16 ]
How can I count the number of different vectors in this sequence?
Thanks
0 commentaires
Réponse acceptée
Walter Roberson
le 14 Juil 2024 à 5:52
Put them together into one 2D array, arranging them as rows (rather than as columns), and then use unique() with the 'rows' option, and count the result.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Creating and Concatenating Matrices 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!