The ability to have the length of the signal to be the same as the length of the window is not available for the SPECTROGRAM function in Signal Processing Toolbox 6.13 (R2010a).
As a workaround, use the IMAGESC function as follows:
T = 0:0.001:2;
X = chirp(T,100,1,200,'q');
[S, F, T, P] = spectrogram(X,128,120,128,1E3);
imagesc(F, T(1), 10*log10(P(:,1).'));
axis xy; axis tight;
xlabel('Frequency (Hz)');
ylabel('Time');
title('Quadratic Chirp');
Best Answer