Count unique vector in a sequence

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

 Respuesta aceptada

Walter Roberson
Walter Roberson el 14 de Jul. de 2024

2 votos

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.

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 14 de Jul. de 2024

Comentada:

el 14 de Jul. de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by