hamming window eqation formula problem

289 Views Asked by At

can anybody know when to take hamming window equation

$$w(n) = 0.54-0.46\cos(2\pi n/M)$$ or $$w(n) = 0.54+0.46\cos(2\pi n/M)$$ i am confused between $+$ and $-$ sign.. which sign wil be considered for which condition?

1

There are 1 best solutions below

0
On

The difference between your two formulas is a shift of $M/2$ samples. Therefore it depends on your convention what formula you want to use. In fact this will also depend on what your convention of sample counting is. If your signal length is $M$ you can either say that your samples correspond to the positions $\{-M/2+1, \ldots, M/2\}$ or simply from $\{0, \ldots, M-1\}$. For illustration see the following two plots, one is made with the minus sign and the first labeling of the x-axis I mentioned and the second one with the latter. I hope that helps... With + sign

With - sign