Re: FFT with matlab
- From: "Guillaume Androz" <badguiz@xxxxxxxxxxx>
- Date: Sat, 12 Aug 2006 12:48:31 -0400
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
.
- Follow-Ups:
- Re: FFT with matlab
- From: Maarten van Reeuwijk
- Re: FFT with matlab
- From: Rune Allnor
- Re: FFT with matlab
- From: Keith Chow
- Re: FFT with matlab
- References:
- FFT with matlab
- From: Guillaume Androz
- FFT with matlab
- Prev by Date: Re: Matlab
- Next by Date: Re: need help on using the UIGETFILES command
- Previous by thread: Re: FFT with matlab
- Next by thread: Re: FFT with matlab
- Index(es):
Relevant Pages
|