필터 지우기
필터 지우기

Count unique vector in a sequence

조회 수: 19 (최근 30일)
Marcus
Marcus 2024년 7월 14일 5:06
댓글: Marcus 2024년 7월 14일 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

채택된 답변

Walter Roberson
Walter Roberson 2024년 7월 14일 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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by