I have a doubt related to calculating the Discrete Time Fourier Transform (DTFT) by hand. Specifically in how calculate the frequency axis of the spectrum. My signal has N values and was sampled at FS Hz, the spectrum would have N entries too (where N/2 values are a mirror of the other half). The maximum representable frequency is FS/2 (by the Nyquist theorem), that means that I have to multiply each entry by FS/N, so for the last entry (N/2) I have this:
(FS/N) * (N/2) = FS/2
But when I sample at a higher FS Hz the spectrum is shifted. Think for instance in this function:
x = cos(2*pi*f0*t)
Where "f0 = 1/T", T is the period of the cosine and "t" means each entry of the time axis. Then the spectrum is two pulses in "-f0" and "f0". But doing this in python:
f = range(-N/2,N/2) f = [float(FS)/(float(N)) * i for i in f]
And sampling at a higher FS, then the pulses are shifted. But the correct behavior is that the pulses remain in the same location ("-f0" and "f0"), because the cosine function period didn't change. Am I doing something wrong?
Thanks in advance ;)
PD: I know that increasing the sampling rate would increase the density of the spectrum and the time signal too, so N is going bigger automatically, because I would have more samples per second.