我想在cellfun
函数上使用strfind
函数来查找另一个字符串元胞数组中的字符串元胞数组中每个字符串的索引,以将它们排除在外。
strings = {'aaa','bbb','ccc','ddd','eee','fff','ggg','hhh','iii','jjj'};
excludedStrings = {'b','g','h'};
idx = cellfun('strfind',strings,excludedStrings);
idx = cell2mat = idx;
idx = reshap(idx,numel(idx),1);
idx = unique(idx);
strings(cell2mat(idx)) = [];
呼叫线路有错误,cellfun
我该如何解决?