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

8 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

madhan ravi
madhan ravi il 10 Apr 2019
setdiff(A,B)

Più risposte (0)

Tag

Prodotti


Release

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by