The FFT is so fast that itβs better to increase the resolution and then simply discard the unwanted data. If you need better spectral resolution (more boxes with frequencies), increase the FFT size. To get a smoother spectrum over time, increase the noverlap value to reduce the increments for each conspiratorial FFT. In this case, you would not specify F. If the FFT size is 1024, you get 1024/2 + 1 frequency cells.
FFTN = 512; start = 512*(350/500); % Only care about freq bins above this value WIN_SIZE = FFTN; overlap = floor(FFTN*0.8); [~,F,T,P] = spectrogram(y, WIN_SIZE, overlap, FFTN); f = 0:(length(F)-1); f = f*((Fs/2)/length(F)); P = P(start:512,:); f = f(1,start:512); imagesc(T,f,10*log10(P),[-70 20]);
source share