フィルターのクリア

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.
  1 件のコメント
Marcus
Marcus 2024 年 7 月 14 日 22:08
Thanks Walter!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by