Check if ID exist in second table

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일

0 개 추천

A = ["1","2","3"];
B = ["2","3"];
C=A(~ismember(A,B))
C = "1"

댓글 수: 1

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?

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Tables에 대해 자세히 알아보기

제품

릴리스

R2022a

질문:

2022년 8월 18일

댓글:

2022년 8월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by