Documentation

This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

blackman

Blackman window

Syntax

```w = blackman(N) w = blackman(N,SFLAG) ```

Description

`w = blackman(N)` returns the `N`-point symmetric Blackman window in the column vector `w`, where `N` is a positive integer.

`w = blackman(N,SFLAG)` returns an `N`-point Blackman window using the window sampling specified by `'sflag'`, which can be either `'periodic'` or `'symmetric'` (the default). The `'periodic'` flag is useful for DFT/FFT purposes, such as in spectral analysis. The DFT/FFT contains an implicit periodic extension and the periodic flag enables a signal windowed with a periodic window to have perfect periodic extension. When `'periodic'` is specified, `blackman` computes a length `N+1` window and returns the first `N` points. When using windows for filter design, the `'symmetric'` flag should be used.

See Algorithms for a description of the difference between the symmetric and periodic windows.

Note

If you specify a one-point window (set `N = 1`), the value `1` is returned.

Examples

collapse all

Create a 64-point Blackman window. Display the result using `wvtool`.

```L = 64; wvtool(blackman(L))```

Algorithms

Blackman Window

The following equation defines the Blackman window of length N:

`$w\left(n\right)=0.42-0.5\mathrm{cos}\frac{2\pi n}{N-1}+0.08\mathrm{cos}\frac{4\pi n}{N-1},\text{ }0\le n\le M-1$`

where M is N/2 for N even and (N + 1)/2 for N odd.

In the symmetric case, the second half of the Blackman window M ≤ n ≤ N – 1 is obtained by flipping 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 to N + 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

Introduced before R2006a

Was this topic helpful?

Download ebook