MATLAB Answers

What is the interpretation of this STFT diagram?

12 views (last 30 days)
This is a STFT diagram, I have got from my signal. I have used these command below:
My confusion arises because on the STFT diagram, I am seeing negetive magnitude -20DB. Usually on the examples of matlab central I have found all with positive magnitude and made senses to me. However, with my sample signal, I have go confused. the sampling frequency is 500000.
I have added the samplesignal.mat file for usage.
I will be really helpful if some one can guide me to understand what is going on over here.


Sign in to comment.

Accepted Answer

Tanisha Gosain
Tanisha Gosain on 18 Jun 2020
The negative value is in dB scale. Linear to dB scale conversion is as follows:
-20dB in dB scale is in linear scale. I checked the maximum magnitude of your output after performing stft:
s = stft(signals,500000,'Window',kaiser(256,5),'OverlapLength',220,'FFTLength',512);
magnitude = abs(s);
maxVal = max(max(magnitude))
Stft on your sample data gives outputs with values less than 1 which converts to a negative value in dB scale.
In my opinion, you will get a positive value in dB only if output from stft contains magnitudes greater than 1.
You may refer to the screenshot attached for more details.
Here is the link to the documentation of the MATLAB stft function:

More Answers (0)

Community Treasure Hunt

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

Start Hunting!