represents a Hann window function of x.
uses the parameter α.
- HannWindow is a window function typically used for finite impulse response (FIR) filter design and spectral analysis.
- Window functions are used in applications where data is processed in short segments and have a smoothing effect by gradually tapering data values to zero at the ends of each segment.
- HannWindow[x,α] is equal to .
- HannWindow[x] is equivalent to HannWindow[x,1/2].
- HannWindow automatically threads over lists.
Examplesopen allclose all
Basic Examples (3)
Create a lowpass FIR filter with cutoff frequency of and length 21:
Taper the filter using a Hann window to improve stopband attenuation:
Log-magnitude plot of the power spectra of the two filters:
Filter a white noise signal using the Hann window method:
Use a window specification to calculate sample PowerSpectralDensity:
Compare to spectral density calculated without a windowing function:
The plot shows that window smooths the spectral density:
Compare to the theoretical spectral density of the process:
Use a window specification for time series estimation:
Properties & Relations (6)
HannWindow[x,1] is equivalent to a Dirichlet window:
HannWindow[x,25/46] is equivalent to a Hamming window:
The area under the Hann window:
Normalize to create a window with unit area:
Fourier transform of the Hann window:
Power spectrum of the Hann window:
Discrete-time Fourier transform of the discrete Hann window of length 11:
Possible Issues (1)
2D sampling of Hann window will use a different parameter for each row of samples when passed as a symbol to Array:
Wolfram Research (2012), HannWindow, Wolfram Language function, https://reference.wolfram.com/language/ref/HannWindow.html.
Wolfram Language. 2012. "HannWindow." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/HannWindow.html.
Wolfram Language. (2012). HannWindow. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/HannWindow.html