I tried to use fft
function in Matlab. I could understand why 'dt(sampling time interval) = 1/fs(sampling frequency). But I couldn't understand why 'df(frequency resolution(increment) = fs/N(length of data or Tmax)'. Why is df variable decided by using fs/N?
A discrete signal of length N can be decomposed into (shifted) sine waves with periods of N, N/2, N/3, N/4, etc., plus a constant (DC) term. This is the decomposition that the DFT computes. Each bin in the DFT thus represents a frequency corresponding to a wavelength (period) that is an integer fraction of the signal length.
Consequently, the smallest frequency in the decomposition is 1/N (corresponding to 1/(dt N) Hz if dt is in seconds).
The next frequency component is 2/N, then 3/N, etc.
The largest frequency component is 1 (corresponding to 1/dt), though that frequency is aliased.