FFT and Cosine Transform
Forward FFT
F(u) = FFT(f(x),-1)
1/m f(x) ·
e-i · u · (2 x/m)
for u = 0,m-1
Inverse FFT
f(x) = FFT(F(u),+1)
F(u) ·
ei · x · (2 u/m)
for x = 0,m-1
Forward Cosine transform
F(u) (1/m) · f(x) · cos(u ·
x/m) · dx [(f(0) + f(m) ·
cos( u))/2 m] + 1/m
f(x) · cos(u · x/m) = FFT(g(x),-1)
g(x) = f(x) for x = 0,m
g(2m-x) = f(x) for x = 1,m-1
Inverse Cosine Transform
f(x) = F(0) + F(m) · cos( x) +
2 ·
F(u) · cos(x · u/m)
= FFT(G(u),+1)
G(x) = F(x) for x = 0,m
G(2m-x) = F(x) for x = 1,m-1