# Documentation

### This is machine translation

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

# blackmanharris

Minimum 4-term Blackman-Harris window

## Syntax

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

## Description

`w = blackmanharris(N)` returns an `N`-point symmetric 4-term Blackman-Harris window in the column vector `w`. The window is minimum in the sense that its maximum sidelobes are minimized.

`w = blackmanharris(N,SFLAG)` uses `SFLAG` window sampling. `SFLAG` can be `'symmetric'` or `'periodic'`. The default is `'symmetric'`. You can find the equations defining the symmetric and periodic windows in Algorithms.

## Examples

collapse all

Create a 32-point symmetric Blackman-Harris window. Display the result using `wvtool`.

```N = 32; wvtool(blackmanharris(N))```

## Algorithms

The equation for the symmetric 4-term Blackman-harris window of length N is

`$w\left(n\right)={a}_{0}-{a}_{1}\mathrm{cos}\left(\frac{2\pi n}{N-1}\right)+{a}_{2}\mathrm{cos}\left(\frac{4\pi n}{N-1}\right)-{a}_{3}\mathrm{cos}\left(\frac{6\pi n}{N-1}\right),\text{ }0\le n\le N-1$`

The equation for the periodic 4-term Blackman-harris window of length N is

`$w\left(n\right)={a}_{0}-{a}_{1}\mathrm{cos}\frac{2\pi n}{N}+{a}_{2}\mathrm{cos}\frac{4\pi n}{N}-{a}_{3}\mathrm{cos}\frac{6\pi n}{N},\text{ }0\le n\le N-1$`
The periodic window is N-periodic.

The following table lists the coefficients:

CoefficientValue
`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.