File Exchange

image thumbnail

fft_plot function

Plot signal fft norm and phase versus frequency and signal versus time. Several options allows to customize the display

16 Downloads

Updated 01 Aug 2019

View License

Plot signal fft norm and phase versus frequency and signal versus time.
Function can also return fft results.

optionnal input argument:
- 'legend': 'signal name'
- 'title': 'your title'
- 'window': 'none', 'hann', 'hamming', 'flattop', 'blackman', 'blackmanharris'
- 'subplot': 'fft', 'fft_signal', 'fft_angle', 'all', 'none'
- 'MinNorm': if norm is lower than this value, angle is forced to 0.
(angle makes no sense for small norm)
- 'fmin': display frequency fmin to fs/2
- 'fmax': display frequency 0 to fmax
- 'Amax': display amplitude 0 to Amax
- 'style': 'line', 'stem', 'bar', 'stairs', 'area', (fft norm only)
- 'scale': 'linear', 'semilogx', 'semilogy', 'loglog'
- 'linewidth': number (defaut is 0.5)

Cite As

pierre-alexandre chauvenet (2019). fft_plot function (https://www.mathworks.com/matlabcentral/fileexchange/72124-fft_plot-function), MATLAB Central File Exchange. Retrieved .

https://stackoverflow.com/questions/33962554/finding-the-phase-of-each-harmonics-using-fft

Comments and Ratings (1)

Simple, efficient and well written code for FFT visual analysis. Perfect fit for presentation purpose.
Would be good if mathworks use it as a native function.

Updates

1.0.3

additional display options

1.0.2

- take both line or column signal input

1.0.1

return fft data (norm, angle, frequency)
plot angle becomes optionnal

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