MATLAB Answers

how to remove duplicates from a mateix ?

105 views (last 30 days)
Mohamed Amine Messaoudi
Mohamed Amine Messaoudi on 19 Dec 2017
Answered: KL on 19 Dec 2017
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

  0 Comments

Sign in to comment.

Accepted Answer

KL
KL on 19 Dec 2017
use
unique(your_matrix,'rows')

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.