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일

0 개 추천

A_uniqueRows = unique( A, 'rows' ) ;
or
A_uniqueRows = unique( A, 'rows', 'stable' ) ;
if you don't want the output to be sorted.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

질문:

2017년 10월 13일

편집:

2017년 10월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by