title: Methodology of FFT for Matlab spectrogram / short time Fourier transform functions
body: <p>I'm trying to figure out how MATLAB does the short time Fourier transforms for its spectrogram function (and related functions like specgram, or stft in Octave).  What is curious to me is that you can apparently specify the length of the window and the FFT length (number of output frequencies) independently, whereas I would have expected that these two should be equal (since the length of an FFT'd signal is the same as the length of the original signal).  To illustrate what I mean, here is the function call:</p>
  
  <p>[S,F,T]=spectrogram(signal,winSize,overlapSize,fftSize,rate);</p>
  
  <p>winSize is the length of subintervals which are to be (individually) FFT'd, and fftSize is the number of frequency components given in the output.  When these are not equal, does Matlab do interpolation to produce the required number of frequency bins?</p>
  
  <p>Ultimately the reason I want to know is so that I can determine the proper units and scaling for the frequencies.</p>
  
  <p>Cheers</p>