MATLAB: Find string within cell array

cell arraysstring

This is probably a dumb question but I can't seem to find anything on google that will allow me to do what I want. All I want to do is check a string against a cell array of strings. Let's say I have something like:
string = 'This is a string';
elements = {'string', 'cell'};
strfind(elements, string);
This returns nothing for me, and it makes me put the cell array first. This is checking for string in elements and I want to check for elements in string. If I swap the parameters like:
strfind(string, elements{1});
This works, but I want to check the entire array, and I think a loop in the code will look bad. Is there any way that I can check to see if any of the stings in my cell array are inside of the sentence?

Best Answer

There's no built-in function for this. If all you want to know is whether each string in the cell array is present in your big string:
ispresent = cellfun(@(s) ~isempty(strfind(string, s)), elements)