Check if ID exist in second table

1 vue (au cours des 30 derniers jours)
Dion Theunissen
Dion Theunissen le 18 Août 2022
Commenté : Dion Theunissen le 19 Août 2022
I have 2 tables, now i want to check which numbers does not exist in the second table. So for example I have:
A = ["1","2","3"];
B = ["2","3"];
I want to check which number doesn't exist and keep that one.
So:
C = ["1"];

Réponses (1)

David Hill
David Hill le 18 Août 2022
A = ["1","2","3"];
B = ["2","3"];
C=A(~ismember(A,B))
C = "1"
  1 commentaire
Dion Theunissen
Dion Theunissen le 19 Août 2022
Now i have a list of double ID's.
C=bookings.id(~ismember(bookings.id(:),KopievanPolissenEuropeesche.VarName1(:)))
How can I use this to get only the table rows without common ID?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Produits


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by