Azzera filtri
Azzera filtri

Count unique vector in a sequence

19 visualizzazioni (ultimi 30 giorni)
Marcus
Marcus il 14 Lug 2024 alle 5:06
Commentato: Marcus il 14 Lug 2024 alle 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

Risposta accettata

Walter Roberson
Walter Roberson il 14 Lug 2024 alle 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.

Più risposte (0)

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by