File Exchange

image thumbnail

Time-Frequency Analysis of Signals with Matlab

version (326 KB) by Hristo Zhivomirov
Time-frequency analysis of non-stationary signals in time, frequency and time-frequency domain.


Updated 02 Aug 2020

View Version History

View License

The present code is a Matlab program for Time-Frequency analysis of a given (non-stationary) signal. The results are:
1) graphical representation of the signal in the time domain;
2) graphical representation of the signal in the frequency domain (via FFT);
3) graphical representation of the signal in the time-frequency domain (via STFT).

The code is based on the theory described in:

[1] G. Heinzel, A. Rudiger, R. Schilling. Spectrum and spectral density estimation by the Discrete Fourier transform (DFT), including a comprehensive list of window functions and some new flat-top windows. Germany, Hannover, Max-Planck-Institut für Gravitationsphysik, 2002.

Cite As

Hristo Zhivomirov (2021). Time-Frequency Analysis of Signals with Matlab (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (23)

guang xu

Godfrey Ojerheghan

Godfrey Ojerheghan

Perfect plot. Exactly what I am looking for. Please can you kindly send the code to my mail ( sir? I have a signal data as a MAT-file. Please help me urgently with the code. Thank you, Hristo.

Lisa Locke

Hristo Zhivomirov

Hi Venkata,

The magnitude of the frequency (and time-frequency) spectrum is given in dBV. The negative sign means that the actual (peak) level of the spectral lines is bellow 1 V. This is the most common case in the time-frequency and spectral analysis.

All best,

Hello sir, may I know why does your magnitude tend to negative.


pengpeng Wang



load gong.mat;
[p,f,t] = pspectrum(y,Fs,'spectrogram','TimeResolution',400/fs);instfreq(p,f,t)


nadom mutlib

tuan tran

Hi Folks,
I am looking of a code to simulate guided waves propogation in a rod and rail and find features. Would you please help me to find such a thing. my email is:



Thank you for every good work you have done!


sy z

Big dream

can you share your email id?

Michael Du

E. Cheynet

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

Inspired: plotpsd

Community Treasure Hunt

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

Start Hunting!