I have two cell arrays of strings, and I want to check if they contain the same strings (they do not have to be in the same order, nor do we know if they are of the same len
Take a look at the function intersect
What MATLAB Help says:
[c, ia, ib] = intersect(a, b) also returns column index vectors ia and ib such that c = a(ia) and b(ib) (or c = a(ia,:) and b(ib,:)).
[c, ia, ib] = intersect(a, b)
ia
ib
c = a(ia)
b(ib)
c =
a(ia,:)
b(ib,:)).