Input:
a={'Time12:30','Time12:40','Time1:40', 'Time2:40'};b={'12:', '1:'};
Wanted Output: (delete from "a" all cells containing string listed in "b")
a={'Time2:40'}
I have tried:
for k = 1 : length(a) for kk = 1 : length(b) if any(~ismember(b{kk}, a{k})) a(k) = []; break; end endend
However this gives me error of such:
Index exceeds matrix dimensions.
I am confused by the error and any guidance is appreciated! Thank you for reading my post.
Best Answer