fftfreq - get exact Matlab FFT frequencies

Calculate FFT frequencies of the amplitudes calculated with the FFT
118 Downloads
Updated 13 Apr 2023

View License

Calculates the exact Fourier frequencies for spectra calculated via FFT. This functionality is not provided by Matlab, hence requires custom function. Currently only works on vectors/1D arrays.
It is not straightforward due to how the operation is done on a bit-level. The first coefficient is 0 Hz (the DC component) but higher negative and positive frequencies are ordered in a specific way, separated at the Nyquist frequency (also optionally returned by the function).

Cite As

Kristupas Tikuišis (2024). fftfreq - get exact Matlab FFT frequencies (https://www.mathworks.com/matlabcentral/fileexchange/113240-fftfreq-get-exact-matlab-fft-frequencies), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2020a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.2

Only the description updated

1.0.1

Updated description

1.0.0