Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unit of fft(DFT) x axis [duplicate]

Possible Duplicate:
How to get Frequency from FFT result

I am somehow confused with the x axis of fft(DFT) command in Matlab. When we do a fft command for a signal which has sampled in n point, we get a plot in which the x axis is 0 to n-1. Does it mean frequency in Hz? For example when I have a spike on n=2 is it mean that the signal frequency is 2Hz?

like image 899
shaloo shaloo Avatar asked Nov 15 '12 12:11

shaloo shaloo


People also ask

What are Y axis units of FFT?

The Y-axis units are the same as the Y-axis units you would have if you plotted the time-domain signal. For instance, if the samples that you input into the FFT are the signal voltage, then the FFT units are also voltage. To get energy units you have to square the absolute value of the FFT.

What are the X and Y axes of a Fourier transform?

The frequency spectrum is from 0 to fs, where fs is your sampling frequency.So in response to your question the Y-axis is the amplitude (because you took the ABS value of the complex output) and the X-axis is the frequency values from 0 to fs.

What are FFT values?

FFT(x, T, Freq) The Fast Fourier Transform (FFT) converts a time series of equally spaced values, «x», from the discrete time (or spatial) domain to the discrete frequency domain. «T» is the time index and «Freq» is the Frequency index, and these two indexes should have the same length.

Why FFT result is mirrored?

Because both the positive and negative frequency sinusoids are 90 degrees out of phase and have the same magnitude, they will both respond to real signals in the same way.


1 Answers

The X axis is dimensionless. To get the correspondence between bin index and frequency you need to know (a) the sample rate (in Hz), Fs, and (b) the number of points in the FFT, N. The centre frequency for the bin is then:

f = i * Fs / N

where f is the bin frequency in Hz and i is the bin index.

See this answer for a more complete explanation.

like image 144
Paul R Avatar answered Sep 29 '22 14:09

Paul R