DSP Blockset | ![]() ![]() |
Compute a window, and/or apply a window to an input signal.
Library
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:
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.
In
port is disabled.
A length-M 1-D vector input is treated as an M-by-1 matrix. The block produces two outputs:
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.
Win
port, the block produces the M-by-1 window vector, w. Output w is always sample-based.
Window Sampling
For the generalized-cosine windows (Blackman, Hamming, and Hann), the Sampling parameter determines whether the window samples are computed in a periodic or a symmetric manner. For example, if Sampling is set to Symmetric, a Hamming window of length M is computed as
If Sampling is set to Periodic, the same window is computed as
Window Type
The available window types are shown in the table below. The Stopband attenuation in dB and Beta parameters specify the characteristics of the Chebyshev and Kaiser windows, respectively, and are only available when those window designs are selected.
When Window type is set to User defined, the Window function block computes the user-defined window specified by the Window function name parameter. If the user-defined window requires parameters other than the window length, select the Additional parameters for user defined window check box. The cell array entered in Window function parameters determines the values of the additional parameters.
For complete information about the other window functions, consult the Signal Processing Toolbox documentation.
Window Type |
Description |
Bartlett |
|
Blackman |
|
Rectangular |
Computes a rectangular window.
|
Chebyshev |
Computes a Chebyshev window with stopband ripple
|
Hamming |
|
Hann |
Computes a Hann window (also known as a Hanning window).
|
Hanning |
Obsolete. This window option is included only for compatibility with older models. Use the Hann option instead of Hanning whenever possible. |
Kaiser |
Computes a Kaiser window with Kaiser parameter
|
Triang |
|
User Defined |
Computes the user-defined window function specified by the entry in the Window function name parameter, |
Dialog Box
Supported Data Types
To learn how to convert to the above data types in MATLAB and Simulink, see Supported Data Types and How to Convert to Them.
See Also
FFT |
DSP Blockset |
bartlett |
Signal Processing Toolbox |
blackman |
Signal Processing Toolbox |
rectwin |
Signal Processing Toolbox |
chebwin |
Signal Processing Toolbox |
hamming |
Signal Processing Toolbox |
hann |
Signal Processing Toolbox |
kaiser |
Signal Processing Toolbox |
triang |
Signal Processing Toolbox |
Also see Signal Operations for a list of all the blocks in the Signal Operations library.
![]() | Vector Scope | Yule-Walker AR Estimator | ![]() |