DSP Blockset    
Window Function

Compute a window, and/or apply a window to an input signal.

Library

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:

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

Computes a Bartlett window.

Blackman

Computes a Blackman window.

Rectangular

Computes a rectangular window.

Chebyshev

Computes a Chebyshev window with stopband ripple R.

Hamming

Computes a Hamming window.

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 beta.

Triang

Computes a triangular window.

User Defined

Computes the user-defined window function specified by the entry in the Window function name parameter, usrwin.

  • w = usrwin(M) % window takes no extra parameters
    w = usrwin(M,x1,...,xn) % window takes extra 
    parameters {x1 ... xn}
    

Dialog Box

Operation
The block's operation: Apply window to input, Generate window, or Generate and apply window. The input/output port configuration is updated to match the parameter setting.
Window type
The type of window to apply. Tunable.
Window length
The length of the window to apply. This parameter is available only when Generate window is selected in the Operation menu. Otherwise, the window vector length is computed to match the input frame size, M.
Sampling
The window sampling for generalized-cosine windows, Symmetric or Periodic. Tunable.
Stopband attenuation in dB
(Not shown in dialog above. Visible for the Chebyshev window.) The level (dB) of stopband attenuation, Rs. Tunable.
Beta
(Not shown in dialog above. Visible for the Kaiser window.) The Kaiser window parameter. Increasing widens the mainlobe and decreases the amplitude of the window sidelobes in the window's frequency magnitude response. Tunable.
Window function name
(Not shown in dialog above. Visible for User defined windows.) The name of the user-defined window function to be calculated by the block.
Additional parameters for user defined window
(Not shown in dialog above. Visible for User defined windows.) Enables the Window function parameters when selected. Select when the user-defined window requires parameters other than the window length.
Window function parameters
(Not shown in dialog above.Visible for User defined windows.) The extra parameters required by the user-defined window function (besides the window length), enabled when Additional parameters for user defined window is selected. The entry must be a cell array.

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