File Exchange

image thumbnail

Short Time Fourier Transform

version 1.1 (1.95 KB) by

Script for computing the short time Fourier transform of 1D signals.



View License

This function enables computation of the short time Fourier transform (STFT) of signals.

The function provides control over the windowing function and overlap ratio, and returns the STFT matrix "fftshifted".

This code was modified from a prior submission by Suraj Kamya, which is available at:

Comments and Ratings (4)

Anton Semechko

Anton Semechko (view profile)

This is a pretty sloppy implementation of short-time FT. There are no default settings provided and the function throws an error if you specify a column vector instead of a row vector as a your input signal.

where is the code? please

Jonathan Lister

Additionally, zero padding should never be done prior to applying a windowing function to your data. This will distort your window function and the results. I believe the first FFT is incorrect.

Jonathan Lister

I don't see where you are scaling the FFTs in your funciton. Each FFT should be scaled by L for complex or L/2 for real valued input.



Correction of typo in comments

MATLAB Release
MATLAB 7.14 (R2012a)

Inspired by: STFT, Short time fourier transform

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today