User`s guide
Window Function
5-541
5Window Function
Purpose Compute a window, and/or apply a window to an input signal.
Library DSP Sources, Signal Operations
Description The Window Function block has three modes of operation, selected by the 
Operation parameter as described below.
Operation Modes
In each mode, the block first creates a window vector, w, by sampling the 
window specified in the 
Window type parameter at M discrete points. The 
Operation modes are:
•
Apply window to input
In this mode the block computes an M-by-1 window vector, w, and multiplies 
the vector element-wise with each of the N channels in the M-by-N input 
matrix u.
y = repmat(w,1,N) .* u % Equivalent MATLAB code
A length-M 1-D vector input is treated as an M-by-1 matrix. The output, y, 
always has the same dimension as the input. If the input is frame-based, the 
output is frame-based; otherwise, the output is sample-based.
•
Generate window
In this mode the block generates a sample-based 1-D window vector, w, with 
length M specified by the 
Window length parameter. The In port is disabled.
•
Generate and apply window
In this mode the block computes an M-by-1 window vector, w, and multiplies 
the vector element-wise with each of the N channels in the M-by-N input 
matrix u.
y = repmat(w,1,N) .* u % Equivalent MATLAB code
A length-M 1-D vector input is treated as an M-by-1 matrix. The block 
produces two outputs:
- At the 
Out port, the block produces the result of the multiplication, y, 
which has the same dimension as the input. If the input is frame-based, 
output y is frame-based; otherwise, output y is sample-based.
- At the 
Win port, the block produces the M-by-1 window vector, w. Output w 
is always sample-based.










