ww=nt_growmask(w,margin) - widen mask ww: widened mask (samples * 1 or samples * 1 * trials) w: mask margin: samples, number of samples by which to widen the mask NoiseTools
0001 function w=nt_growmask(w,margin) 0002 %ww=nt_growmask(w,margin) - widen mask 0003 % 0004 % ww: widened mask (samples * 1 or samples * 1 * trials) 0005 % 0006 % w: mask 0007 % margin: samples, number of samples by which to widen the mask 0008 % 0009 % NoiseTools 0010 0011 [m,n,o]=size(w); 0012 w=(w~=0); 0013 w=nt_unfold(w); 0014 w=filter(ones(margin+1,1),1,w)>0; 0015 w=flipud(filter(ones(margin+1,1),1,flipud(w))>0); 0016 w=(w~=0); 0017 w=nt_fold(w,m);