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

2 vues (au cours des 30 derniers jours)
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 commentaire
Adam Danz
Adam Danz le 14 Mai 2019
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.

Connectez-vous pour commenter.

Réponse acceptée

Fangjun Jiang
Fangjun Jiang le 14 Mai 2019
unique(A,'rows')

Plus de réponses (0)

Catégories

En savoir plus sur Language Fundamentals dans Help Center et File Exchange

Produits


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by