How to eliminate duplicate rows without sorting column in Matlab

70 次查看(过去 30 天)
Hi,
Here is one problem that maybe some people will find useful to them.
I got matrix, lets say 500x9. In this matrix some rows are identical so they have to be eliminated. But the 3rd column musn't be sorted. This must be unchanged. All other columns can be changed (sorted).
I tryed this with function unique, but it sort me 3rd column.
Thank you in advance.
Have a nice day,
Nejc

回答(1 个)

Azzi Abdelmalek
Azzi Abdelmalek 2013-4-4
unique(A,'stable')
  4 个评论

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by