Hi Guys,
I am working my way up to understanding digital filters so I thought it might be a good idea to make sure I know the basics of fourier transforms.
As an experiment I started with a simple square wave signal (in Matlab x=[1 1 1 1 0 0 0 0]) that is made up of 8 points. After pushing it through my FFT (in Matlab
) and then removing the upper half of the points I get:
0 2.0-4.8j 0 2.0-0.8j
then I introduce the sine an cosine functions and get:
2Cos(PI/180*x) - 4.8Sin(PI/180*x) + 2Cos(PI/180*x*3) - 0.8Sin(PI/180*x*3)
Now for my question. If I understood it correctly then I have taken the signal in the time domain and broken it up into a function containing sine and cosine functions. Thus if I where to plot the above function I should get roughly the same signal. Meaning with the same amplitude and frequency, but I am not. The plot represents a square wave but the amplitude is about 4x more than the original signal and the wave is inverted.
What am I missing? Why is the amplitude in the time and frequency domain different and inverted?
Thanks guys!