Re: FFT with matlab



Well ok, I think I must add some precisions on my topic...

I know very well all is said in your answer to have coded
my own FFT function on visual basic, C++ ...
I know of course that we are dealing with discrete fourier
transform on a finite time domain ...
But here is not my topic.

Take a function like
u0 = exp(-t.^2); with
t = -10:10/1024:10*(1-1/1024);

Then compute ufft = fft(u0);
This new function is a very well known FFT!! of the u0
function. Furthermore, you must use fftshift to obtain
a so called "real TF" of u0 on a frequency domain between
the nyquist frequencies.

First, this new function ufft should have a maximum at the
middle of the frequency domain (use of fftshift) that has
the value sqrt(pi) or even unity depending on the convention used in
matlab (engineer or unity). However, it
is not the case.

Now, lets return in the time domain. I found that
u1 = ifft(ufft); and
u2 = ifft(fftshift(ufft));
give exactly the same result. If I think a few moment, I
think I could find a reason of that... but it is not the
problem. The problem is that it now not necessary to take
fftshift of u1 or u2 to have a symetrical function as it
was the case with the fft function !
Furthermore, the functions u1 or u2 have their maximum to
be unity, that is consistent with the reciprocity of the
fft and ifft functions. But if I want to work on the
"approximate" TF of a function, it would be better to
have the right values. I tried to find a proportional
factor like sqrt(pi), sqrt(2*pi), pi, N (to be the sample
number)... but I have not found it yet !

So these are my questions on the way the FFT are done.
Maybe I must try to code my own FFT or explore more the
matlab code to find the way it is done.

Thanks again
.



Relevant Pages

  • Re: Frequency domain integration and differentiation
    ... integration and differentiation in the frequency domain. ... For test cases in the time domain, I generate 3 single frequency data sets: ... Next, I do an FFT of the time domain velocity data, ...
    (sci.math.num-analysis)
  • Re: Fourier Transform unique?
    ... seem to have a strong sinusoidal group delay and the same FFT. ... Say you have a point in the frequency domain with a ... in the time domain this corresponds to shifting a cosine wave ... the time domain (with its 2 pi ambiguity). ...
    (comp.dsp)
  • Re: Fourier Transform unique?
    ... seem to have a strong sinusoidal group delay and the same FFT. ... Say you have a point in the frequency domain with a ... in the time domain this corresponds to shifting a cosine wave ... the time domain (with its 2 pi ambiguity). ...
    (comp.dsp)
  • Frequency domain integration and differentiation
    ... I'm learning about fourier analysis and am experimenting with integration and differentiation in the frequency domain. ... For test cases in the time domain, I generate 3 single frequency data sets: ... Next, I do an FFT of the time domain velocity data, ...
    (sci.math.num-analysis)
  • Re: FFT with matlab
    ... This new function is a very well known FFT!! ... a so called "real TF" of u0 on a frequency domain between ... The range of the spectrum after the DFT is arbitrary. ... matlab (engineer or unity). ...
    (comp.soft-sys.matlab)