The DFT of a vector x of length n is another vector y of length n:
where ω is a complex nthroot of unity:
This notation uses i for the imaginary unit,and p and j for indices thatrun from 0 to n–1. The indices p+1and j+1 run from 1 to n, correspondingto ranges associated with MATLAB vectors.
Data in the vector x are assumed to be separatedby a constant interval in time or space, dt = 1/fs or ds =1/fs,where fs is the samplingfrequency. The DFT y is complex-valued.The absolute value of y at index p+1 measures the amount of the frequency f = p(fs / n) present in the data.
The first element of y, corresponding tozero frequency, is the sum of the data in x. This DCcomponent is often removed from y sothat it does not obscure the positive frequency content of the data.