How to eliminate the rows with replication?

1 vue (au cours des 30 derniers jours)
Grace
Grace le 10 Août 2014
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.

Réponse acceptée

Ahmet Cecen
Ahmet Cecen le 10 Août 2014
C = unique(A,'rows')

Plus de réponses (0)

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by