How to eliminate the rows with replication?

1 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by