Don't need to explicitly loop -- MATLAB has functions builtin to do that for you.
So, depending upon what it is you need to return, you have the locations in the read in string array found in the check string array in ia and the location of the first matching location in the check array (if more than one) for the associated string.
See the doc for ismemeber for the full details on input/output arguments.
You've now got the strings found in the check array and where all of them are by string along with the string itself.
Only the second loop needed to find for each by string; the first loop is inside the much more efficient builtin ismember function to do the hard work.
If you wanted, you could replace the explicit for...end loop above with a cellfun construct