Check if ID exist in second table

조회 수: 1 (최근 30일)
Dion Theunissen
Dion Theunissen 2022년 8월 18일
댓글: Dion Theunissen 2022년 8월 19일
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