Author 
Comment/Response 
Ernesto Estevez Rams

08/25/99 7:53pm
Hello there,
I was trying to implement the fast cosine transform and the fast sine transform in mathematica. I tried the usual way of extending the data in a even and a odd manner and then doing a fast fourier transform using Fourier[]. It did not work. The output in each case was a mixture of real and imaginary parts and not a completelly real or a pure imaginary output.
I then looked more closely to the Fourier function. I generated an odd data list making a table out of a sine function.
dat=Table[Sin[x],{x, 0, 10 Pi, 10 Pi/256}]
then
Fourier[dat]
The output should had been pure imaginary. It was not. The output ressembled the delta function behavior in frecuency 1 and 1 but it had complex numbers with real and imaginary parts in it. The analytical function FourierTransform[] gives the correct Pi I (Delta[1+w]+Delta[1+w]), yet in the FFT implementation it seems to be some numerical precision error. I increased the data to the interval {0, 100 Pi}and increased the number of points to 1000. Still the output contained non neglible mixed complex number.
Going back to my original problem. I want to implement the Fast cosine transform and the fast sine transform. I am expecting that when I apply this function to my data set I get as an output a transform data which represents a real valued physical data. Any hints on how to do it?
Thanks in advance
Ernesto
URL: , 
