--- function Y = hann_win(X) This function apply hanning window to given data. size(X)=[N,T], where N is the number of signals and T is the number of time samples. 2004-10-04 Taku Yoshioka --- Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function Y = hann_win(X) 0002 % --- 0003 % function Y = hann_win(X) 0004 % This function apply hanning window to given data. 0005 % size(X)=[N,T], where N is the number of signals and T is the 0006 % number of time samples. 0007 % 0008 % 2004-10-04 Taku Yoshioka 0009 % --- 0010 % 0011 % Copyright (C) 2011, ATR All Rights Reserved. 0012 % License : New BSD License(see VBMEG_LICENSE.txt) 0013 0014 [N,T] = size(X); 0015 h = 0.5-0.5*cos(2*pi*(0:T-1)./(T-1)); 0016 Y = X.*repmat(h,[size(X,1) 1]); 0017