In Matlabs recent versions, the specgram function is being replaced by spectrogram, and the documentation states:
Note. To obtain the same results for the removed specgram function, specify a 'Hann' window of length 256.
Unfortunately, that doesn't seem to work for me, if I use spectrogram(signal,hann(256)), the result is different from specgram(signal), although both are quite similar. Is there a way to get the exact same output?
