unique
조회 수: 5 (최근 30일)
이전 댓글 표시
Hi,
I have a matrix (1000*6). I want to delete duplicate rows. Then I want to know which row have been deleted since I have another matrix in which I want to delete the same rows.
I'm not sure I understood completely the function 'unique'.
I'm a bit confused by the ordering, are the new matrix not keeping the row sequence as in the original matrix?
Regards
댓글 수: 0
답변 (1개)
Matt Kindig
2012년 3월 21일
Take a look at the second and third outputs in the documentation for 'unique', to see how to determine which rows were deleted.
The result of unique is sorted-- you can use the outputs to restore them to their original ordering.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!