According to the Matlab documentation,

[Lia,Locb] = ismember(A,B) returns an array, Locb, containing the lowest index in B for each value in A that is a member of B.

Is there a way to return an array (or matrix) containing all indexes in B for each value in A that is a member of B?

## Best Answer