I am really having a hard time to understand how the fft-function in MATLAB works. According to:
http://www.mathworks.de/help/matlab/math/fast-fourier-transform-fft.html
fs/n is the distance between the sampled points in the Spectrum, where fs is the sampling frequency and n is the length of the signal. The code that they present, does extract the frequencies (although I do not know why), but according to the implementation of fft, that they present:
http://www.mathworks.de/help/matlab/ref/fft.html
the distance between the points in the spectrum should rather be: 1/fs. Because instead of the index j one inserts j*T, where T = 1/fs is the sampling time and then you can calculate the distance between the points, which should not be fs/n.
I would really be grateful if someone could explain me what the distance between the points in the frequency domain is and why this is so:)
[EDIT]
This is not a Matlab-specific problem. It is more a problem about the relationship between the Fourier-Transformation and the Discrete-Fourier-Transformation and the scaling/units of the frequency-axis. A pretty good explanation can be found in this PDF-Document at page 3.
[/EDIT]
f = (0:n-1)*(fs/n)andt = (0:L-1)*T;? Do you realise that there are time and frequency - two different things? I am getting the feeling that you are getting confused with how the plots have been done using f, Fs, and T. - ha9u63arf = (0:n-1)*(1/fs);- stackMill