Home > vbmeg > functions > tool_box > time_frequency > hann_win.m

hann_win

PURPOSE ^

---

SYNOPSIS ^

function Y = hann_win(X)

DESCRIPTION ^

 ---
 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)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005