FFT and Cosine Transform


Forward FFT
F(u) = FFT(f(x),-1) ident 1/m sumf(x) · e-i · u · (2 pi x/m)     for u = 0,m-1

Inverse FFT

f(x) = FFT(F(u),+1) ident sumF(u) · ei · x · (2 pi u/m)     for x = 0,m-1

Forward Cosine transform

F(u) ident (1/m) · integ f(x) · cos(u · pi x/m) · dx approx [(f(0) + f(m) · cos(pi u))/2 m] + 1/m sum f(x) · cos(u · pi 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(pi x) + 2 · sum F(u) · cos(x · pi u/m) = FFT(G(u),+1)

G(x) = F(x)     for x = 0,m
G(2m-x) = F(x)     for x = 1,m-1