1function [nWin,nInc,inx]=wind(tWin,fs,nmic) 2 3nWin = round(tWin*fs); % Audio window size in samples 4if nWin/2 ~= fix(nWin/2) % Ensure samples are even for overlap and add 5 nWin = nWin+1; 6end 7nInc = round(nWin/2); % Window increment %50 overlap 8% hWin=repmat(hWin,1,nmic); % repeat to match number mic 9inx=zeros(nWin,nmic); % initial window 10end