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

1 次查看(过去 30 天)
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 个评论
Chad Greene
Chad Greene 2016-3-28
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.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Blue 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by