How to cut duplicate rows from a matrix

조회 수: 2 (최근 30일)
John Hunt
John Hunt 2017년 10월 13일
편집: Cedric 2017년 10월 13일
I have a matrix that has 60,000+ rows and there are duplicate of rows in this matrix example: [1 2 3; 1 2 3; 2 3 3; 2 3 3] How can I get a matrix that just has [1 2 3; 2 3 3]?

채택된 답변

Cedric
Cedric 2017년 10월 13일
편집: Cedric 2017년 10월 13일
A_uniqueRows = unique( A, 'rows' ) ;
or
A_uniqueRows = unique( A, 'rows', 'stable' ) ;
if you don't want the output to be sorted.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by