Discrete Fourier series
Given 2N samples of real data
(where j = 0;1;2;...;2N-1) taken at equally spaced intervals
, where T is the period, the corresponding
Fourier series is:

where
and
is the mean value of
.
From the original 2N data points, we have exactly 2N
calculated coefficients, that is, we have N+1
's and N-1
's with "real" information.
If t=0 at
, then for each
we have
,
for j = 0;1;...;2N-1, and so

The amplitude, A, and the phase, P, are calculated as follows:



