Hi I am learning FFT I am confused about this bit of code: what is the reason for scaling the sampling frequency and what is bin scale and why and when do we use it? thank you

Fs = 20000; % sampling frequency
Binscale = 100;
%FFT for determining fundamental frequency with 0.01Hz accuracy
k = Fs*Binscale;

  • $\begingroup$ If answers are sufficient, do not hesitate to upvote and validate, please $\endgroup$ – Laurent Duval Nov 16 '20 at 6:11

This is not easy to tell without knowing the purpose. However, here is a guess. A frequency bin (in an FFT) is a subdivision of a continuous frequency axis into equally sized intervals, often called frequency resolution. The width of such an interval is determined by a maximum frequency divided by the length of the FFT. Here, a target frequency bin is set: $0.01$ Hertz.

Thus, I suspect that $k$ could be used to set a forthcoming FFT length.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.