I would like to search a vector of strings in two columns of a cell array of strings A (300.000 x 7).
string=[53716;59428;58221;679854].
Here below is the code:
y=arrayfun(@(x)~cellfun(@isempty,regexp(A(:,3:4),string(x))),1:numel(string),'uni',false);
y=cat(1,y{:});
This question is similar to How to search for a string in cell array in MATLAB? and this one Searching cell array with regex
However this solution takes hours. Does anyone know a more efficient way to perform the same operation?