Check if ID exist in second table

2 次查看(过去 30 天)
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"];

回答(1 个)

David Hill
David Hill 2022-8-18
A = ["1","2","3"];
B = ["2","3"];
C=A(~ismember(A,B))
C = "1"
  1 个评论
Dion Theunissen
Dion Theunissen 2022-8-19
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?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by