how to remove duplicates from a mateix ?

3 visualizaciones (últimos 30 días)
Mohamed Amine Messaoudi
Mohamed Amine Messaoudi el 19 de Dic. de 2017
Respondida: KL el 19 de Dic. de 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

Respuesta aceptada

KL
KL el 19 de Dic. de 2017
use
unique(your_matrix,'rows')

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by