Delete row with same value but in different columns

1 次查看(过去 30 天)
I have a matrix like:
[1 1 2 1 47 ; 1 1 47 1 2]
How to delete one of the rows and keep the other ?
Thanks

采纳的回答

Matt J
Matt J 2021-4-30
For example, to delete the first row,
A=[1 1 2 1 47 ; 1 1 47 1 2]
A = 2×5
1 1 2 1 47 1 1 47 1 2
A(1,:)=[]
A = 1×5
1 1 47 1 2
  3 个评论
Matt J
Matt J 2021-4-30
编辑:Matt J 2021-4-30
[~,idx] = unique(sort(angles_new,2),'rows');
angles_new=angles_new(idx,:); %unsorted

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by