## STFT

Purpose
Description
Tips
Macro Synopsis
Modules
Related Functions

### Purpose

Short-time Fourier Transform

### Description

"STFT" computes a time-frequency distribution of an input signal x within a given frequency interval as a sequence of short-time spectra of windowed signal segments with constant length.

This function returns a 2D signal of the adaptive time-frequency spectrum. It is displayed as time (x-axis) versus frequency (y-axis) with the power or amplitude spectral values given on the z-axis.

Parameters of "STFT" are

• lower frequency f0 in reciprocal x-axis units,
• upper frequency f1 in reciprocal x-axis units,
• fres, which is the output resolution of the frequency axis (number of points),
• tres, which is the output resolution of the time axis (number of points)
• window size N (length of a signal segment) in samples,
• spectrum type (spectype), which is either
• "Power" (0) or
• "Amplitude" (1)
and
• type of normalization (normtype), which is either
• "Absolute Power/Amplitude" (0),
• "Spectral Density" (1) or
• "Maximum Norm" (2).

### Tips

There is always an inherent tradeoff between time resolution and frequency resolution with being the sampling period (scale) of the signal. It can be expressed by the uncertainty relationship . Thus, the appropriate choice of N strongly depends on the scale (i.e. the sampling period) and the characteristics of the signal to be analysed.

### Macro Synopsis

y = STFT(x,f0,f1,fres,tres,N,spectype,normtype);
signal x, y;
float f0, f1;
int fres, tres, N;
option spectype, normtype;

Note that y is a 2D signal.

Spectral

### Related Functions

Momentary ARMA spectrum, Multiscale TFD.