I have a cell vector with different & redundant company names. And a list of interesting companies. I try to figure out, where in the big matrix the interesting companies appear. I am interested in all appearances. My Code for some reason does not work. the ismember returns always an error.
Comps = Data0(:,7);
for i = 1: length(relCompQ)
comp = relCompQ{i,1};
c(:,i) = find(ismember(Comps,comp));
end
errors:
Error using cell/ismember>cellismemberR2012a (line 192) Input A of class cell and input B of class char must be cell arrays of strings, unless one is a string.
Error in cell/ismember (line 56)
[varargout{1:max(1,nargout)}] = cellismemberR2012a(A,B);
Both Vectors have values like: 'Nike', 'Adidas', 'BMW' etc.