I have a str variable below which holds the subject name in the form of "S01_output.xlsx" where '01' part can be any number.
filename='S02_output.xlsx'; substring={'02', '04', '07'};
In an if statement, I need to check if filename contains certain numbers which are found in the array called substring. I tried ismember(filename, substring) but I guess it only works when there is exact match.
Best Answer