# Hamming Window - Understanding Formula

I'm trying to understand the Hamming window concept (Signal Processing) and the equation looks like the following:

Where:

N = number of Samples in each frame

Y[n] = Output Signal

X(n) = Input Signal

W(n) = Hamming window

First Question: I have "framed" (split the signal into blocks), so therefore, in X(n) do I pass in the values for each block, and, not the block itself?

Second question regarding the Hamming Window:

The equation is given:

From this I get:

w(n) = new vector

e.g. w(0) = 0.54 - 0.46 cos()

This is where I get lost. Shameful I know. Right, I know this is really stupid of me to ask but could someone help me out understanding the rest of this equation? I.e. in english steps?

Hope someone can help.

-

First Question: I have "framed" (split the signal into blocks), so therefore, in X(n) do I pass in the values for each block, and, not the block itself?

You have divided your entire signal in blocks of length $N$ (perhaps overlaping), and what follows is to be done for each block. So, in what follows $X(n)$ represents your input signal with $n=0$ being the start of your particular block.

Second question regarding the Hamming Window:

(please dont post images for formulas here, learn to type equations in latex) It seems you confused $N$ (fixed, window size) with $n$. The formula is

$$w(n) = 0.54 - 0.46 \cos\left(\frac{2 \pi \, n}{N-1} \right)$$

If you graph this (image on the left here), you see that it's a smooth window peaked in the center of your block (N/2). To get $y(n)$, you just multiply, value by value:

$$y(n) = x(n) \, w(n)$$

BTW, this kind of question is better suited to http://dsp.stackexchange.com/

-
Hey - Take N = (Number of samples in each frame) = 256 .. So therefore will the values for w(n) range from 0 - 255 because N - 1? –  Phorce Dec 1 '12 at 22:40
The values of $n$ range from 0 to 255, yes. –  leonbloy Dec 1 '12 at 22:41
So this equation.. w(0) = 0.54 - 0.46 * cos(2*pi / 255) = 0.28203645802 .. Is this correct? If so, the value shouldn't ever change, should it? Because every block N = 256 N-1 = 255 –  Phorce Dec 1 '12 at 22:44
You are forgettin the $n$ in the numerator –  leonbloy Dec 1 '12 at 23:00
but <mi>n</mi> is just ranging from 0 to 256 (block size) etc, right? –  Phorce Dec 1 '12 at 23:03