annotate toolboxes/graph_visualisation/graphViz4Matlab/util/findString.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 function idx = findString(str, cellArray,ignoreCase)
wolffd@0 2 % Returns a boolean matrix the same size as cellArray with true everywhere
wolffd@0 3 % the corresponding cell holds the specified string, str.
wolffd@0 4
wolffd@0 5 if nargin < 3, ignoreCase = false; end
wolffd@0 6 if ignoreCase, fn = @(c)strcmpi(c,str); else fn = @(c)strcmp(c,str); end
wolffd@0 7 idx = cellfun(fn,cellArray);
wolffd@0 8 end