0
$\begingroup$

I am trying to implement the STFT by MATLAB, and I read somewhere that we must do zeropadding to the subsequence of the signal before windowing it with a Gaussian window. What happens if we don't do any windowing?

$\endgroup$
  • $\begingroup$ I think it's the same reason as why you'd want to Zero pad any signal before taking its FFT. $\endgroup$ – Sudarsan Sep 25 '13 at 21:12
5
$\begingroup$

You don't HAVE to zero pad, ever, unless there are constraints on the length of data required by the FFT algorithm - often it's a case of speed.

Many FFT's (like the Numerical Recipes code) require a power-of-two length series, some (like Kiss-FFT) only require it to be an even number, but being a multiple of 2,3 and 5 makes it run much faster.

In Matlab's case the algorithm is optimized for dealing with power-of-two length data. It usually pads the data to achieve this for you, though you control how many powers-of-two you wish to pad up to.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.