How to get the numbers that do not overlap with another matrix?

7 visualizaciones (últimos 30 días)
Leon
Leon el 10 de Abr. de 2019
Comentada: Leon el 10 de Abr. de 2019
Imagine, I have a matrix A = [1, 2, 5, 7, 9]; and B = [1,3,5];
How do I find all numbers in Matraix A that do not already overlapping with B? In this case, 1 and 5 in A have overlapping numbers in B, so 2, 7, 9 would be my answer.
Thank you.

Respuesta aceptada

madhan ravi
madhan ravi el 10 de Abr. de 2019
setdiff(A,B)

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by