Documentation

blackmanharris

Minimum four-term Blackman-Harris window

Description

example

w= blackmanharris(N)returns anN-point symmetric four-term Blackman-Harris window.

w= blackmanharris(N,sflag)returns a Blackman-Harris window using the window sampling method specified bysflag.

Examples

collapse all

Create a 32-point symmetric Blackman-Harris window. Display the result usingwvtool.

N = 32; wvtool(blackmanharris(N))

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-Harris window, returned as a column vector.

Algorithms

The equation for the symmetric four-term Blackman-Harris window of lengthNis

w ( n ) = a 0 a 1 cos ( 2 π n N 1 ) + a 2 cos ( 4 π n N 1 ) a 3 cos ( 6 π n N 1 ) , 0 n N 1

The equation for the periodic four-term Blackman-Harris window of lengthNis

w ( n ) = a 0 a 1 cos 2 π n N + a 2 cos 4 π n N a 3 cos 6 π n N , 0 n N 1

The periodic window isN-periodic.

Coefficient Value
a0 0.35875
a1 0.48829
a2 0.14128
a3 0.01168

References

[1] harris, fredric j. “On the Use of Windows for Harmonic Analysis with the Discrete Fourier Transform.”Proceedings of the IEEE®. Vol. 66, January 1978, pp. 51–83.

Extended Capabilities

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

Introduced before R2006a