0
$\begingroup$
  1. I have a signal with length of $N$.
  2. The sampling frequency is $f_s$.
  3. Window size is $w$
  4. The noverlap size is set to $m$.
  5. And $nfft$ is selected for frequency resolutions.

I am running a STFT with matlab spectrogram function.

[S,F,T,P]=spectrogram(x,window,noverlap,nfft,fs)  
  • what is the effect of nfft , $f_s$ and noverlap on STFT computational burden?
  • what is computation complexity of STFT with these parameters size? {in term of big O() }

Note: The FFT computational complexity for a signal with length of $N$ is $Nlog(N)$

$\endgroup$

1 Answer 1

3
$\begingroup$

The number of FFTs is roughly N/(w-m). An fft costs you nfft*log2(nfft) so the total is proportional to N/(w-m)*nfft*log2(nfft).

A typical application would make nfft = w and m = w/2, so this would come out to be proportional to N*log2(nfft). So it's proportional to the length or you data set (obviously) and the log of the FFT size.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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