Identifying missing values in matrices

15 vues (au cours des 30 derniers jours)
Joel Schelander
Joel Schelander le 6 Avr 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

Réponse acceptée

David Fletcher
David Fletcher le 6 Avr 2021
try
idx=~ismember(B,A)
C=A(idx)

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by