Kelvin-> I really appreciate your detailed reply, which helps me a lot in >understanding the situation more. > > However, I wish to ask -- isn't there really any way I can retrieve an >FFT(b) which is almost the same as FFT(a)?? > > Reason: The values in vector a is the result of an IFFT(A) at my >Encoder. > At the Decoder, due to some reverse process, I was able >to get values in vector b (which is supposed to be ideally the same as >vector a, under no distortion. And this is really the case, as illustrated >in the 2 mat files a.mat and b.mat). > And when I take BT(b) at the Decoder, I'm supposed to >have B ideally the same as AT(a). Only then can I decode correctly. > > Have you got any advice? As explained previously, if a and b have any differences, due to numerical error, loss in your encoder, etc. then FFT results A and B could well be substantially different. Maybe a and b were supposed to be the same, and your algorithm did something to one of them? I'm not sure what you are doing or why. What is the "some reverse process" that you mention? Is this a reasearch or commercial project? Instead of questioning why FFT works the way it does, why not explain your project and then someone might suggest a different or suitable approach that solves the problem? Jeff Brower DSP sw/hw engineer Signalogic >----- Original Message ----- >From: Jeff Brower <> >To: Kelvin <> >Cc: <> >Sent: Saturday, March 24, 2001 4:26 AM >Subject: Re: [matlab] FFT and IFFT >> Kelvin- >> >> > To illustrate my case, I've attached the values of vector a and b. >You >> >can see for yourself that they are really ALMOST EQUAL. (In fact, I've >taken >> >the trouble to check all the 512 samples.) >> > >> > You will find that fft(a) = fft(b) only at index =1,2 ......233 and >281, >> >282, .... 512. >> > And fft(a) ~= fft(b) at index = 234, 235, ........280. >> > >> > I really think there is something wrong as I expect their fft's to be >> >also ALMOST EQUAL. >> >> They're fine -- again, MINOR difference in time domain = MAJOR difference >in >> frequency domain. This is one of the things that makes FFT powerful, >don't you >> think? Another way to think about it: >> >> -take a flat line of all 1s, do FFT. Result only at dc; >> zero value at all frequencies. >> >> -now add one "spike", or glitch to line (i.e. >> change only one value to 2, keep others 1). >> Result at EVERY frequency. >> >> Why? Because that one spike (or "impulse") contains, by definition, all >> possible frequencies. So you can see that even very small change in time >domain >> makes a big difference in frequency domain. >> >> Also, do not forget that if your input vector is real, then the FFT >results are >> symmetric about N/2 (in this case 256). So you can ignore 257-512 values. >> >> Jeff Brower >> DSP sw/hw engineer >> Signalogic |