tags:

views:

4231

answers:

5

1) Besides the negative frequencies, which is the minimum frequency provided by the FFT function? Is it zero?
2) If it is zero how do we plot zero on a logarithmic scale?
3) The result is always symmetrical? Or it just appears to be symmetrical?
4) If I use abs(fft(y)) to compare 2 signals, may I lose some accuracy?

+2  A: 

Well, if you want to understand the Fast Fourier Transform, you want to go back to the basics and understand the DFT itself. But, that's not what you asked, so I'll just suggest you do that in your own time :)

But, in answer to your questions:

  1. Yes, (excepting negatives, as you said) it is zero. The range is 0 to (N-1) for an N-point input.
  2. In MATLAB? I'm not sure I understand your question - plot zero values as you would any other value... Though, as rightly pointed out by duffymo, there is no natural log of zero.
  3. It's essentially similar to a sinc (sine cardinal) function. It won't necessarily be symmetrical, though.
  4. You won't lose any accuracy, you'll just have the magnitude response (but I guess you knew that already).
James Burgess
Ah, sinc is symmetric about the y-axis, but sine is not. Thanks for the clarification.
duffymo
+2  A: 

Consulting "Numerical Recipes in C", Chapter 12 on "Fast Fourier Transform" says:

  1. The frequency ranges from negative fc to positive fc, where fc is the Nyquist critical frequency, which is equal to 1/(2*delta), where delta is the sampling interval. So frequencies can certainly be negative.

  2. You can't plot something that doesn't exist. There is no natural log of zero. You'll either plot frequency as the x-axis or choose a range that doesn't include zero for your semi-log axis.

  3. The presence or lack of symmetry in the frequency range depends on the nature of the function in the time domain. You can have a plot in the frequency domain that is not symmetric about the y-axis.

  4. I don't think that taking the absolute value like that is a good idea. You'll want to read a great deal more about convolution, correction, and signal processing to compare two signals.

duffymo
With regard to #1, the original question was "besides negative(s)"... hence my answer.
James Burgess
Statements about the frequency range are hard to make without knowing something about the function being transformed. The Fourier transform of a real and even function is real and even, but the original question didn't specify this.
duffymo
True enough. Problems arise, as you say, from trying to answer questions without an adequate scenario.
James Burgess
A: 

Half your question:

3) The results of the FFT operation depend on the nature of the signal; hence there's nothing requiring that it be symmetrical, although if it is you may get some more information about the properties of the signal

4) That will compare the magnitudes of a pair of signals, but those being equal do no guarantee that the FFTs are identical (don't forget about phase). It may, however, be enough for your purposes, but you should be sure of that.

+10  A: 
Federico Ramponi
In matlab, it's a bit tricky to call a function but tell it to ignore certain values in the input. Hence my suggestion of replacing 0 by a small value that can be plotted.
PolyThinker
+2  A: 
  1. result of fft can be 0. already answered by other people.
  2. to plot 0 frequency, the trick is to set it to a very small positive number (I use exp(-15) for that purpose).
  3. already answered by other people.
  4. if you are only interested in the magnitude, yes you can do that. this is applicable, say, in many image processing problems.
PolyThinker

related questions