Create a 64-point Hamming window. Display the result using
L = 64; wvtool(hamming(L))
Comparison of Periodic and Symmetric Hamming Windows
Design two Hamming windows:
The first window has N = 64 and is symmetric.
The second window has N = 63 and is periodic.
Display the two windows.
Hs = hamming(64,'symmetric'); Hp = hamming(63,'periodic'); wvt = wvtool(Hs,Hp); legend(wvt.CurrentAxes,'Symmetric','Periodic')
L — Window length
Window length, specified as a positive integer.
sflag — Window sampling
'symmetric' (default) |
Window sampling method, specified as:
'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 transform. When
'periodic'is specified, the function computes a window of length
L+ 1 and returns the first
w — Hamming window
Hamming window, returned as a column vector.
The following equation generates the coefficients of a Hamming 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.