Is there an equivalent to bsxfun for non-numeric data?
For example, I want to compare all pairs of strings stored in two cell-arrays:
a = {'aa', 'bb', 'cc'};b = {'dd', 'aa'};bsxfun( @strcmp, a, b' ); % not working for cells
I want something like this:
bsxfun(@eq, 1:3, (1:4)')ans = 1 0 0 0 1 0 0 0 1 0 0 0
Best Answer