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 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