Grep.m
Jump to navigation
Jump to search
function [A,I]=grep(strarray,str) %strarray is char array A=[]; I=[]; for irow=1:size(strarray,1), if findstr(deblank(strarray(irow,:)),str), I=[I ; irow]; A=strvcat(A,strarray(irow,:)); end end