searchcell.m: Always in the last place you look

I frequently find myself wanting to find and extract data of different types from a cell array. Sometimes, I want to find an exact match to either a number or text, and sometimes I want to find anything that contains a match, even if there's more besides. Sometimes I want to search for elements that are NOT a number (i.e., NaNs). Normally, I would have to use different strategies to perform all of these comparisons, which can be tiresome. So I wrote a small function called searchcell which bundles up all of this functionality for me and outputs a single array whose values specify the indices of a cell that match the desired criterion.

See the help notes in the function below for usage.

return to main page