Effacer les filtres
Effacer les filtres

deleting all rows from column 1 with duplicates in column 2.

1 vue (au cours des 30 derniers jours)
Rafael Borobio Castillo
Rafael Borobio Castillo le 1 Août 2023
I have the following Table: Column 1 is the product ID and Column 2 is the previous product ID.
I want to delete all duplicates, so all values that are shown in colum 2 must be deleted from column 1. How can I do this.

Réponse acceptée

Matt J
Matt J le 1 Août 2023
setdiff(Column1,Column2)
  1 commentaire
Rafael Borobio Castillo
Rafael Borobio Castillo le 1 Août 2023
Thanks it works quite well, at the end I finished using ismember to identificate the position of the duplicates because I need to eliminate this from a larger dataset.
All the best, Rafael

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Resizing and Reshaping Matrices dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by