# DFT implementation: relationship between number of samples and resolution of frequency

I come from an engineer background and I am sorry that this got so long.

If $f(t)$ is a continuous signal, let $f[k]$ be the discretized signal for a timerange $T$ between two samples with for example $N=1000$ samples. Now the discrete fourier transform of $f[k]$ is $F(j\omega) = \sum_{k=0}^{N-1}f[k]exp(-j\omega kT)$.

Now I am wondering about two things concerning the evaluation of this formula in praxis (as implemented in matlab, etc...), but both are related to the fact that in principle I am free to evaluate this formula for every imaginable $\omega$.

1. Why do I get in practice if I use octave or matlabs fft() function for a vector with N samples as an output a vector with N frequencies. Why not more or less? I just found following citation about this: "We could in principle evaluate this for any $\omega$, but with only N data points to start with, only N final outputs will be significant." I can grasp this idea a little bit but it is still too vague.

2. Now independently (but I guess it must be related to it) of the first point, I can choose a certain range of frequencies that I want to extract from $f[k]$. How do I choose the highest one? Isn't this $\omega=\frac{2\pi}{T}$? In the source I read they argue as follows: interpret the signal as periodic, so the fundamental frequency is $\omega=\frac{2\pi}{NT}$. Then start from $\omega=0,\frac{2\pi}{NT}$ until reaching $\frac{2\pi}{NT}(N-1)$ after what you have N frequencies for N input samples (see point 1.). Unfortunately I have several questions related to this:

• why do I place my frequencies uniformly? Why not achieve a higher resolution for lower frequencies and a low resolution for the higher frequencies (for example). See also Reduced frequency range FFT (non-uniform discrete Fourier transform). Another related question is found under What is the role of the frequencies $2\pi k/N$ in the DFT?

• why don't I evaluate my signal for even higher signals than $\omega=\frac{2\pi}{T}$? From the formula, I don't see it is prohibited but I know that there is some Shannon Sampling Theorem behind this.

• am I right if I assume, that Matlab, octave, etc...fft() functions output is finally just the smartest output considering the requirements (higher frequencies can not be detected according to the theorem, uniformly spaced because it is just 'nice' to plot?