Identifying missing values in matrices

1 Ansicht (letzte 30 Tage)
Joel Schelander
Joel Schelander am 6 Apr. 2021
Beantwortet: David Fletcher am 6 Apr. 2021
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

Akzeptierte Antwort

David Fletcher
David Fletcher am 6 Apr. 2021
try
idx=~ismember(B,A)
C=A(idx)

Weitere Antworten (0)

Kategorien

Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by