Main Content

nuttallwin

Nuttall-defined minimum 4-term Blackman-Harris window

Description

w = nuttallwin(L) returns a Nuttall defined L-point, four-term symmetric Blackman-Harris window. The coefficients for this window differ from the Blackman-Harris window coefficients computed with blackmanharris and produce slightly lower sidelobes.

example

w = nuttallwin(L,sflag) uses sflag window sampling.

w = nuttallwin(___,typeName) specifies the option to return the window w with single or double precision for any of the previous syntaxes. (since R2026a)

Examples

collapse all

Compare 64-point Nuttall and Blackman-Harris windows. Plot them using wvtool.

L = 64;
w = blackmanharris(L);
y = nuttallwin(L);
wvtool(w,y)

Figure Window Visualization Tool contains 2 axes objects and other objects of type uimenu, uitoolbar, uipanel. Axes object 1 with title Time domain, xlabel Samples, ylabel Amplitude contains 2 objects of type line. Axes object 2 with title Frequency domain, xlabel Normalized Frequency (\times\pi rad/sample), ylabel Magnitude (dB) contains 2 objects of type line.

Compute the maximum difference between the two windows.

max(abs(y-w))
ans = 
0.0099

Input Arguments

collapse all

Window length, specified as a nonnegative integer.

Note

If you specify L as noninteger, the function rounds it to the nearest integer value.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Window sampling, specified as "symmetric" or "periodic". For the equations that define the symmetric and periodic windows, see Algorithms.

Output data type (class), specified as one of these:

  • "double" — Use this option to return a double-precision output w.

  • "single" — Use this option to return a single-precision output w.

Data Types: char | string

Output Arguments

collapse all

Nuttall defined Blackman-Harris window, returned as a column vector of length L. The function minimizes the maximum sidelobes of the window.

Algorithms

The equation for the symmetric Nuttall defined four-term Blackman-Harris window is

w(n)=a0a1cos(2πnN1)+a2cos(4πnN1)a3cos(6πnN1)

where n= 0,1,2, ... N-1.

The equation for the periodic Nuttall defined four-term Blackman-Harris window is

w(n)=a0a1cos(2πnN)+a2cos(4πnN)a3cos(6πnN)

where n= 0,1,2, ... N-1. The periodic window is N-periodic.

The coefficients for this window are

a0 = 0.3635819

a1 = 0.4891775

a2 = 0.1365995

a3 = 0.0106411

References

[1] Nuttall, Albert H. “Some Windows with Very Good Sidelobe Behavior.” IEEE® Transactions on Acoustics, Speech, and Signal Processing. Vol. ASSP-29, February 1981, pp. 84–91.

Extended Capabilities

expand all

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

GPU Code Generation
Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.

Version History

Introduced before R2006a

expand all