Main Content


Determine whether window-overlap combination is COLA compliant



tf = iscola(window,noverlap) checks that the specified window and overlap satisfy the Constant Overlap-Add (COLA) Constraint to ensure that the Inverse Short-Time Fourier Transform results in perfect reconstruction for nonmodified spectra.

tf = iscola(window,noverlap,method) specifies the inversion method to use.

[tf,m] = iscola(___) also returns the median of the COLA summation. You can use these output arguments with any of the previous input syntaxes.


[tf,m,maxDeviation] = iscola(___) returns the maximum deviation from the median m.


collapse all

Create a periodic root-Hann window of length 120. Test whether the window is COLA compliant with a 50% overlap.

win = sqrt(hann(120,'periodic'));
noverlap = 60;

Check whether the window is COLA compliant with a 50% overlap.

tf = iscola(win,noverlap)
tf = logical

Create a periodic Hamming window of length 256. Set the method of Overlap-Add as 'ola'.

window = hamming(256,'periodic');
method = 'ola';
noverlap = 128;

Test whether the window is COLA compliant with a 50% overlap. Also calculate the median of the COLA summation and the maximum deviation from that summation.

[tf,m,maxDeviation] =  iscola(window,noverlap,method)
tf = logical

m = 1.0800
maxDeviation = 2.2204e-16

Input Arguments

collapse all

Analysis window, specified as a vector.

Example: win = bartlett(120) is a Bartlett window of length 120.

Data Types: double | single

Number of overlapped samples, specified as a positive integer smaller than the length of window.

Data Types: double | single

Method of overlap-add, specified as:

  • 'wola' — Weighted Overlap-Add.

  • 'ola' — Overlap-Add.

Output Arguments

collapse all

COLA compliance, returned as a logical scalar. If the function returns a 1 (true), then the window and overlap length satisfy the COLA constraint.

Median of the COLA summation, returned as a real scalar. If the inputs are COLA compliant, then m is equal to the COLA summation constant.

Maximum deviation from the median m. If window and noverlap are COLA compliant, the maxDeviation is close to the expected numeric precision error of the COLA summation.


You can conclude strong COLA-compliance if m = 1 and maxDeviation is close to the numeric precision error.

More About

collapse all

Inverse Short-Time Fourier Transform

The inverse short-time Fourier transform is computed by taking the IFFT of each DFT vector of the STFT and overlap-adding the inverted signals. The ISTFT is calculated as follows.


where R is the hop size between successive DFTs, Xm is the DFT of the windowed data centered about time mR, and xm(n)=x(n)g(nmR). The inverse STFT is a perfect reconstruction of the original signal as long as m=ga+1(nmR)=cn, where the analysis window g(n) was used to window the original signal and c is a constant. This figure depicts the steps in reconstructing the original signal.

Constant Overlap-Add (COLA) Constraint

To ensure successful reconstruction of nonmodified spectra, the analysis window must satisfy the COLA constraint. In general, if the analysis window satisfies the condition m=ga+1(nmR)=cn,, the window is considered to be COLA-compliant. Additionally, COLA compliance can be described as either weak or strong.

  • Weak COLA compliance implies that the Fourier transform of the analysis window has zeros at frame-rate harmonics such that


    Alias cancellation is disturbed by spectral modifications. Weak COLA relies on alias cancellation in the frequency domain. Therefore, perfect reconstruction is possible using weakly COLA-compliant windows as long as the signal has not undergone any spectral modifications.

  • For strong COLA compliance, the Fourier transform of the window must be bandlimited consistently with downsampling by the frame rate such that


    This equation shows that no aliasing is allowed by the strong COLA constraint. Additionally, for strong COLA compliance, the value of the constant c must equal 1. In general, if the short-time spectrum is modified in any way, a stronger COLA compliant window is preferred.

You can use the iscola function to check for weak COLA compliance. The number of summations used to check COLA compliance is dictated by the window length and hop size. In general, it is common to use a=1 in m=ga+1(nmR)=cn, for weighted overlap-add (WOLA), and a=0 for overlap-add (OLA). By default, istft uses the WOLA method, by applying a synthesis window before performing the overlap-add method.

In general, the synthesis window is the same as the analysis window. You can construct useful WOLA windows by taking the square root of a strong OLA window. You can use this method for all nonnegative OLA windows. For example, the root-Hann window is a good example of a WOLA window.

Perfect Reconstruction

In general, computing the STFT of an input signal and inverting it does not result in perfect reconstruction. If you want the output of ISTFT to match the original input signal as closely as possible, the signal and the window must satisfy the following conditions:

  • Input size — If you invert the output of stft using istft and want the result to be the same length as the input signal x, the value of

    k = NxLML

    must be an integer. In the equation, Nx is the length of the signal, M is the length of the window, and L is the overlap length.

  • COLA compliance — Use COLA-compliant windows, assuming that you have not modified the short-time Fourier transform of the signal.

  • Padding — If the length of the input signal is such that the value of k is not an integer, zero-pad the signal before computing the short-time Fourier transform. Remove the extra zeros after inverting the signal.


[1] Allen, J. B. "Short Term Spectral Analysis, Synthesis, and Modification by Discrete Fourier Transform." IEEE Transactions on Acoustics, Speech and Signal Processing. Vol. 25, Number 3, June 1977, pp. 235–238.

[2] Griffin, Daniel W., and Jae S. Lim. "Signal Estimation from Modified Short-Time Fourier Transform." IEEE Transactions on Acoustics, Speech and Signal Processing. Vol. 32, Number 2, April 1984, pp. 236–243.

[3] Sharpe, Bruce. Invertibility of Overlap-Add Processing., accessed July 2019.

[4] Smith, Julius Orion. Spectral Audio Signal Processing., online book, 2011 edition, accessed Nov 2018.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2019a

See Also