I am a novice in signal processing. I am writing a code to apply the hamming window to a sinusoidal signal. So first I have digitized my sinusoidal signal by choosing a sampling rate more than twice its frequency.
These are the values for the signal: F=500 Hz, T=2 ms, and sampling rate=2000 Hz.
Now, I guess I have to multiply the function of the window to the signal so:
for (i=0; i<windowSize; i++)
data(i)=signal(i)*window(i)
i=i+0.5; //sampling time
My question is when we multiply the window to the signal, does the window function has to be digitized by the sampling rate of the signal or it can be digitized anyway we want? In the code I have digitized the window function according to the sampling rate. Thank you.

If you wrote, “I want to multiply a signal sequence by Peter K’s Hamming window sequence. What should be the value of N?” To answer that question we don’t need to know the sample rate, or the start/stop time duration, of your signal. All we need to know is what is the length of your signal sequence measured in samples. If you said your signal sequence length is 2000 samples, then N = 2000.
– Richard Lyons Aug 28 '15 at 08:20