The following Matlab project contains the source code and Matlab examples used for fourier coefficient conversion.
[a, b] = FOURIERexp2cossin(c)
Calculate the cos (a) & sin (b) coefficients of the exponential
Fourier coefficients (c) returned by fft(x)/size(x,1),
while isreal(x) = true
needs the unshifted coefficients as input
c = FOURIERcossin2exp(a, b)
Calculate the exponential Fourier coefficients (c) of the
cos (a) & sin (b) coefficients while a(1) = a0 .