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

# sigwin.nuttallwin class

Package: sigwin

Construct Nuttall defined four-term Blackman-Harris window object

## Description

### Note

The use of `sigwin.nuttallwin` is not recommended. Use `nuttallwin` instead.

`sigwin.nuttallwin` creates a handle to a Nuttall defined four-term Blackman-Harris window object for use in spectral analysis and FIR filtering by the window method. Object methods enable workspace import and ASCII file export of the window values.

## Construction

`H = sigwin.nuttallwin` returns a Nuttall defined four-term Blackman-Harris window object window object `H` of length 64.

`H = sigwin.nuttallwin(Length)` returns a Nuttall defined four-term Blackman-Harris window object `H` of length `Length`. Entering a positive noninteger value for `Length` rounds the length to the nearest integer. Entering a 1 for `Length` results in a window with a single value of 1. The `SamplingFlag` property defaults to `'symmetric'`.

## Properties

 `Length` Nuttall defined four-term Blackman-Harris window length. The window length must be a positive integer. Entering a positive noninteger value for `Length` rounds the length to the nearest integer. Entering a 1 for `Length` results in a window with a single value of 1. `SamplingFlag` The type of window returned as one of `'symmetric'` or `'periodic'`. The default is `'symmetric'`. A symmetric window exhibits perfect symmetry between halves of the window. Setting the `SamplingFlag` property to `'periodic'` results in a N-periodic window. The equations for the Nuttall defined 4–term Blackman-Harris window differ slightly based on the value of the `SamplingFlag` property. See Algorithms for details.

## Methods

 generate Generates Nuttall defined four-term Blackman-Harris window info Display information about Nuttall defined four-term Blackman-Harris window object winwrite Save Nuttall defined four-term Blackman-Harris window object values in ASCII file

## Copy Semantics

Handle. To learn how copy semantics affect your use of the class, see Copying Objects (MATLAB) in the MATLAB® Programming Fundamentals documentation.

## Examples

expand all

Generate two Nuttall-defined four-term Blackman-Harris windows:

• The first window has N = 64 and is symmetric.

• The second window has N = 63 and is periodic.

Display the two windows.

```Hs = sigwin.nuttallwin(64); Hp = sigwin.nuttallwin(63); Hp.SamplingFlag = 'periodic'; wvt = wvtool(Hs,Hp); legend(wvt.CurrentAxes,'Symmetric','Periodic')```

Generate a symmetric Nuttall-defined four-term Blackman-Harris window with N = 16. Return the window values as a column vector. Show information about the window object. Display the window.

```H = sigwin.nuttallwin(16); win = generate(H)```
```win = 0.0004 0.0048 0.0306 0.1105 0.2778 0.5292 0.7983 0.9755 0.9755 0.7983 ```
`wininfo = info(H)`
```wininfo = 4x26 char array 'Nuttall Window ' '-------------- ' 'Length : 16 ' 'Sampling Flag : symmetric' ```
`wvtool(H)`

## Algorithms

The following equation defines the symmetric Nuttall defined four-term Blackman-Harris window of length N.

`$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 following equation defines the periodic Nuttall defined four-term Blackman-Harris window of length N.

`$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 following table lists the coefficients:

CoefficientValue
a00.3635819
a10.4891775
a20.1365995
a30.0106411

## References

Nuttall, A. H. “Some Windows with Very Good Sidelobe Behavior.” IEEE® Transactions on Acoustics, Speech, and Signal Processing. Vol. 29, 1981, pp. 84–91.