Identifying missing values in matrices

I have two matrices. A=429x1 and B=412x1
Every number in the B matrix exists in A. However I want to find out which numbers are missing in B. Like
C=17x1

 採用された回答

David Fletcher
David Fletcher 2021 年 4 月 6 日

0 投票

try
idx=~ismember(B,A)
C=A(idx)

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by