MATLAB Answers

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

2 ビュー (過去 30 日間)
Pedro Guevara
Pedro Guevara 2019 年 5 月 14 日
Edited: Pedro Guevara 2019 年 5 月 14 日
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.

サインイン to comment.

採用された回答

Fangjun Jiang
Fangjun Jiang 2019 年 5 月 14 日
unique(A,'rows')

  1 件のコメント

Pedro Guevara
Pedro Guevara 2019 年 5 月 14 日
Perfect. I did not think it was so easy. XD

サインイン to comment.

More Answers (0)

サインイン してこの質問に回答します。

製品


リリース

R2017b

Translated by