how to remove duplicates from a mateix ?

조회 수: 3 (최근 30일)
Mohamed Amine Messaoudi
Mohamed Amine Messaoudi 2017년 12월 19일
답변: KL 2017년 12월 19일
Hi,
I have a n*2 vector with some duplicates
M
ans
12 48
12 48
50 36
50 36
4 9
4 9
.....
I would like to remove duplicate rows so that i can have something like this
12 48
50 36
4 9
I tried to use unique but it returned just the first column
Thanks in advance

채택된 답변

KL
KL 2017년 12월 19일
use
unique(your_matrix,'rows')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by