how to remove duplicates from a mateix ?

2 次查看(过去 30 天)
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