function [ok,varargout] = found(text,array) % FOUND set to true when text is found in an array index % % syntax: % ok=found(text,array) ok = ~isempty(find(strcmpi(array,text))); if ok && nargout == 1 varargout = find(strcmpi(array,text)); end