Remove duplicated rows in a matrix
1 回表示 (過去 30 日間)
古いコメントを表示
Hi
I have some (x,y) points and it consists of some duplicated values, for example (x3,y3) is duplicated 3 times in data. How I can find/remove this point and other duplicated points in all my data?
Thanks.
Mani
0 件のコメント
回答 (1 件)
Michael Haderlein
2014 年 9 月 25 日
編集済み: Michael Haderlein
2014 年 9 月 25 日
unique(array,'rows') can do the job:
>> A=[1 2;3 4;5 6;1 2]
A =
1 2
3 4
5 6
1 2
>> unique(A,'rows')
ans =
1 2
3 4
5 6
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!