How to eliminate the rows with replication?

1 回表示 (過去 30 日間)
Grace
Grace 2014 年 8 月 10 日
回答済み: Ahmet Cecen 2014 年 8 月 10 日
Hi, I have
a=[1 1 2],
I want to know all the possible arrangements of a, then I do the permutation which gives me:
> perms(a)
ans =
2 1 1
2 1 1
1 2 1
1 1 2
1 1 2
1 2 1
How to eliminate the rows that replicated? Thanks in advance.

採用された回答

Ahmet Cecen
Ahmet Cecen 2014 年 8 月 10 日
C = unique(A,'rows')

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by