MATLAB: Using ismember to select row

ismember

I am trying to use ismember, but not exactly sure it will do what i need.
I have an matrix of indices, not necessarily a sequential array, of values from 0 to 10.
A=[0 1 2 3 6 9 10]
I have a second array, a 3 column matrix, that is made of the values of A. Example below.
B= [0 1 3;
3 6 9;
0 3 8;
5 4 9]
I am looking for a way to select only those rows in B, that contain the values listed in A. The values in A can be used more than once, but all 3 columns have to have one of those values.

Best Answer

r = find(all(ismember(B,A),2));
The values in 'r' are indices of rows of B consisting entirely of element of A.