Hann (Hanning) window
Create a 64-point Hann window. Display the result using
L = 64; wvtool(hann(L))
L— Window length
Window length, specified as a positive integer.
sflag— Window sampling
Window sampling, specified as one of the following:
'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
'periodic' is specified,
hann computes a window of length
L + 1 and returns the first
w— Hann window
Hann window, returned as a column vector.
The following equation generates the coefficients of a Hann window:
The window length L = N + 1.
 Oppenheim, Alan V., Ronald W. Schafer, and John R. Buck. Discrete-Time Signal Processing. Upper Saddle River, NJ: Prentice Hall, 1999.