It's possible to perform elementary set operations with Matlab. Let's assume we have given two vectors or arrays
A = randi([0 10],1,5);
B = randi([-1 9], 1,5);
and we want to find all elements which are in A and in B. For this we can use
C = intersect(A,B);
C will include all numbers which ...