File Exchange

image thumbnail

FFT-based Convolution

version (4.1 KB) by Luigi Rosa
A fast 1D and 2D convolution.


Updated 08 Jan 2004

View License

FFT-based convolution.
See readme.txt for more informations.

Please contribute if you find this software useful. Report bugs to

Luigi Rosa
Via Centrale 27
67042 Civita di Bagno
L'Aquila --- ITALY
mobile +39 340 3463208

Cite As

Luigi Rosa (2020). FFT-based Convolution (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (12)

haha mark

atfter install
MATLAB has encountered an internal problem and needs to close
The unsaved information you were working on may be lost. We are sorry for the inconvenience
Click Never Send to disable sending information to Math Works(saved in preference)
Click send to send this information to math Works
Click end now to close matlab now
Click Attempt to Continue to try to return briefly to MATLAB. You might be able to save your work
Do not continue your MATLAB session after trying to save your work. Further operations are unreliable
You must close and restart maTLAB in order for the program to operate correcthy
Click details to see what will be sent to mathWorks if the send button is clicked


Felipe G. Nievinski

The code is bug-prone because it has lots of unnecessary duplicated portions. I'd recommend instead <>.

Vishnuvenkatesh Dhage

Rameez Ahmed

I need coding for convolution coding theory in MATLAB. Need some help!!

Ila Fiete

This is a simple code for 2-d convolution, based on the built-in matlab routine for 2-d fft. You can write it easily yourself, but this code is pretty clean and straightforward.

For large matrices, filter2 or conv2 are v. slow in matlab for large matrices. This code leads to a considerable speedup, by a factor of 5-10 on my machine, when I convolve a 500^2 matrix with a 100^2 one.

Andreas Silzle

Comparison of calculation times
Signal length 1 second, impulse length 1 second, fs=44100, vectors (one-dimension).
conv 103.8 s
filter 79.4 s
fftfilt 0.38 s
convfft 0.92 s
Signal length 10 seconds, impulse length 1 second
fftfilt 1.28 s
convfft 14.61 s
Matlab 6.5.1
AMD Athlon XP 2000+ (1.67 GHz), 512 MB RAM

Pedro Cati

I suppose not. Conv performs time domain convolution. A possible improvement could be wavelet-based convolution...FFtfilt is a 1D FFT-based convolution (OLA method) and this operator in N-dimensions can be performed in N step.

Park Hanguk

Isn't the standard implementation of the conv function in Matlab already based on fft?....

Jay Liu

fftfilt in matlab is only for 1D cases.

Ewing Young

Yuval Cohen

Matlab has a function called fftfilt (in the signal processing toolbox) that does the exact same thing, only faster. This algorithm is also known as Overlap add.


Software upgraded: complex input

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux