Remove rows from a matrix by considering repeated elements of the first column.

1 次查看(过去 30 天)
Good afternoon. I am writing to request your help again. It turns out that I have a matrix called "TT_XY" that contains some heights in the first column, while in the other second column there are elements that have associated heights. As you can deduce, for each node there is corresponding height (for that reason there are several nodes that have the same height). What I need is to eliminate the repeated nodes along with their corresponding height (column 1) and leave only a single node of each type. Below I show how my matrix is ​​currently configured. Thank you.
  1 个评论
Adam Danz
Adam Danz 2019-5-14
How about you make this a tad easier for volunteers and provide a copy-paste format of TT_XY and also provide the expected output.

请先登录,再进行评论。

采纳的回答

Fangjun Jiang
Fangjun Jiang 2019-5-14
unique(A,'rows')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

产品


版本

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by