Spectrogram function vs. interactive differences

2 visualizzazioni (ultimi 30 giorni)
Clay Smith
Clay Smith il 4 Nov 2019
Risposto: Subhadeep Koley il 7 Nov 2019
I am doing some scripting where I intend to create many spectrograms and save them to image files. First I used the interactive Spectrogram in the Signal Analyzer and identified the settings that I want to use in the script. However I cannot find a combination of settings in the function that gives the same appearance as the interactive tool output. Specifically the interactive spectrogram looks like it may have been smoothed in the frequency direction whereas the scripted spectrogram is much more noisy.
Spect Interactive.PNG Spect Scripted.PNG
The input data are the same in both cases. My scripted spectrogram is:
spectrogram(spectdata,5120,2560,256,256,'MinThreshold',-30,'yaxis');
Interactive settings:
Spect int settings.PNG
I've tried many combinations of parameters but the smooth vs. noisy appearance always remains.
There is no Leakage setting in the function but that is not the difference.
I read the manual page for how the spectrogram is constructed but there is no clue there.
Any suggestions?

Risposte (1)

Subhadeep Koley
Subhadeep Koley il 7 Nov 2019
Hi, in this case you can (Starting from MATLAB R2017b) directly generate the script which creates the spectrogram inside the Signal Analyzer App. Using that generated script you can programmatically create the same spectrogram as generated by the Signal Analyzer App.
A detail instructions can be found here.
Hope this helps!

Categorie

Scopri di più su Time-Frequency Analysis in Help Center e File Exchange

Prodotti


Release

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by