Help needed for Matlab Spectrogram plot
spectrogram(x, N, N/2, N, fs, ‘yaxis’) is my default one liner.

To get rid of the non-SI time units, I think you need to do
[S, F, T] = spectrogram(x, N, N/2, N, fs);
pcolor(S, F, 20*log10(abs(S)));
cb = colorbar()
cb.Label.String = «some unit»;
cl = get(gca, ‘CLim’);
set(gca, ‘CLim’, cl(2)+[-40 0];

From memory. You might want to check that S is «amplitude» rather than power, and if pcolor takes S and F in this order or backwards. Also consider shading flat (if dataset is dense) or using imagesc() instead of pcolor.