Azzera filtri
Azzera filtri

Why do spectrograms produced using the exact same code in 2015b and 2016a look so different?

2 visualizzazioni (ultimi 30 giorni)
I have a signal for which I am looking at the spectrogram of, when I upgraded from 2015b to 2016a, the spectrogram suddenly looked very different despite using the exact same options in the spectrogram function. Why is this?
Here is the code that is run in both 2015b and 2016a:
% Spectrogram settings
Ny = length(y);
nsc = floor(Ny/10);
nov = floor(0.9*nsc);
nff = 0:20000;
% Spectrogram
spectrogram(y,nsc,nov,nff,Fs,'yaxis');
And here are the resultant spectrograms, with both colourmaps set to Jet using colormapeditor, left is 2015b and right is 2016a.
  3 Commenti
Daniel Wilson-NUnn
Daniel Wilson-NUnn il 28 Mar 2016
Will post later today when I have my desktop back up and running, only have MATLAB 2016a on my laptop.
Chad Greene
Chad Greene il 28 Mar 2016
This is either a difference in the display or a difference in the calculation of the values being displayed. It's most likely an issue of the display, not the underlying values. Could be the figure renderer or some other minor difference in default settings.
Matlab figure windows have never been the best way to display data, so screenshots of figure windows do not offer a good direct comparison. Try using export_fig to get a more accurate picture of the plot in both releases.
On a related note, if you are concerned about potentially nonphysical speckles being introduced into the display of your data, be warned that the jet colormap inherently introduces false gradients and puts emphasis on arbitrary values. The lightness profile of a jet colormap does not increase linearly with the values it represents. It is possible that the differences you're seeing are very small differences that have been amplified by effects of the jet colormap. Perhaps a more linear-lightness colormap like parula or cubehelix or Jan Brewer's colormaps will mute the effect you're seeing.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Colormaps in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by