MATLAB: Non-looping way to compare cellstr arrays of different sizes

cellstr array comparein-lineismemberMATLABunequal size

Suppose A = {'aa', 'kk', 'ccc'}, B = {'aa', 'bb', 'cc', 'dd', 'ee'}.
Is there a not-explicitly-looping way to return a logical array the same size as A that is 1 where an element of A is in B, 0 where it is not, e.g.,
"whereMember"(A,B) => [1 0 0]?
Thanks!

Best Answer

A = {'aa', 'kk', 'ccc'};
B = {'aa', 'bb', 'cc', 'dd', 'ee'};
ismember(A,B)