I have two cell arrays. I need to calculate the fraction of elements in the first cell array that do not occur in the second cell array. The elements in the cell array will be very large so a loop will take rather long, is there any way of doing this efficient? Below is a miniature example.
x = {'a b' ;'b c' ;'c d'}
y = {'1 a' ;'a b' ;'b d'}
I've tried to do cellfun(@strcmp, x, y) but this compare element by element when x and y are of same size. Instead I need to check if 'a b' is in y, etc for each element in x. This answer to the above should give 2/3, meaning 2 elements out of 3 are not in the y cell array.
Any vectorized ideas?