Documentation

blackman

Blackman window

Description

example

w= blackman(L)returns anL-point symmetric Blackman window.

w= blackman(L,sflag)returns a Blackman window using the window sampling method specified bysflag.

Examples

collapse all

Create a 64-point Blackman window. Display the result usingwvtool.

L = 64; wvtool(blackman(L))

Input Arguments

collapse all

Window length, specified as a positive integer.

Data Types:single|double

Window sampling method, specified as:

  • 'symmetric'— Use this option when using windows for filter design.

  • 'periodic'— This option is useful for spectral analysis because it enables a windowed signal to have the perfect periodic extension implicit in the discrete Fourier transform. When'periodic'is specified, the function computes a window of lengthL+ 1 and returns the firstLpoints.

Output Arguments

collapse all

Blackman window, returned as a column vector.

Algorithms

The following equation defines the Blackman window of lengthN:

w ( n ) = 0.42 0.5 cos ( 2 π n L 1 ) + 0.08 cos ( 4 π n L 1 ) , 0 n M 1

whereMisN/2 whenNis even and (N+ 1)/2 whenNis odd.

In the symmetric case, the second half of the Blackman window,MnN– 1, is obtained by reflecting the first half around the midpoint. The symmetric option is the preferred method when using a Blackman window in FIR filter design.

The periodic Blackman window is constructed by extending the desired window length by one sample toN+ 1, constructing a symmetric window, and removing the last sample. The periodic version is the preferred method when using a Blackman window in spectral analysis because the discrete Fourier transform assumes periodic extension of the input vector.

References

[1] Oppenheim, Alan V., Ronald W. Schafer, and John R. Buck.Discrete-Time Signal Processing. Upper Saddle River, NJ: Prentice Hall, 1999, pp. 468–471.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

See Also

Apps

Functions

Introduced before R2006a