# How to determine STFT parameters as a function of desired resolution

None of the Q&As I've seen thus far have given a clear answer to what seems like a simple question: assuming I know the CenterFrequency, FrequencySpan/Bandwidth, SampleRate, and one or both of DesiredTimeResolution and DesiredFrequencyResolution, how do I determine the WindowSize and Number of Points for an STFT(nfft)? Working with complex/baseband signals if that makes a difference.

• This answer seems to be saying that frequency resolution/resolution bandwidth is just SampleRate/nfft.
• However that doesn't give me a formula for relating desired time resolution to STFT input arguments. Nor does it give me a formula for determining WindowSize (I've seen several explanatinos which say WindowSize should equal the NumberFFTPoints) but would like to double check that this is correct and/or understand what happens when they are different.