2 pi i
win[i] = (1-a) - a cos (------) , i = 0, ..., N-1
N-1
The parameter a is 0.46 for a conventional Hamming window, 0.5 for a full raised-cosine window, and 0 for a rectangular window. Note that for the full raised-cosine window, the two end points of the window are zero.
Define the effective window length as the length of a rectangular window which has the same energy as the Hamming window. Then the effective length of the Hamming window is
L = N - 2a(N+1) + a^2 (3N+5)/2, for N > 3.
2 - 8a + 8a^2, for N = 2
1 for N = 1 (win[0] = 1)