STFT Spectrogram PtByPt VI
- Updated2025-07-30
- 3 minute(s) read
Computes the signal energy distribution in the joint time-frequency domain using the short-time Fourier transform (STFT) algorithm.
This VI performs a sliding FFT. This VI is similar to the STFT Spectrograms VI.

Inputs/Outputs
initialize
—
initialize, when TRUE, initializes the internal state of the VI.
x
—
x is the time waveform.
sample length
—
sample length is the length of each set of incoming data. The VI performs computation on each set of data. The default is 100. sample length must be greater than 0.
time increment
—
time increment is the number of samples needed to shift the sliding window. The default is 1. When you increase time increment, you decrease computation time and reduce memory requirements, but you reduce time-domain resolution. When you decrease time increment, you improve time-domain resolution, but you increase computation time and memory requirements.
window length
—
window length is the actual length of the selected window. The default is 50. It corresponds to the number of samples used in calculating the Fourier transform.
window selector
—
window selector determines the type of analysis window the VI uses to compute the spectrogram.
STFT Spectrogram {X}
—
STFT Spectrogram {X} is a 2D array that describes the time waveform energy distribution in the joint time-frequency domain. The number of rows, time axis, in STFT Spectrogram {X} is equal to the number of elements in the time waveform divided by time increment and then rounded up. The number of columns, frequency axis, in STFT Spectrogram {X} is equal to (window length/2) + 1.
error
—
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster. |
Examples
Refer to the following example files included with LabVIEW.
- labview\examples\Signal Processing\Point by Point\Moving STFT PtByPt.vi
initialize
—
x
—
sample length
—
STFT Spectrogram {X}
—
error
—