4.4

4.4 | 5 ratings Rate this file 44 downloads (last 30 days) File Size: 1.4 KB File ID: #5110

Fast Convolution

by Stephen McGovern

 

06 Jun 2004 (Updated 12 Jul 2004)

Code covered by the BSD License  

Convolves two extremely large vectors in reasonable time.

Download Now | Watch this File

File Information
Description

This function convolves two very large vectors very quickly. Enormous gains in speed are due to the use of two fft's and an ifft. To find out how to use this program, put it in you 'work' folder and type "help fconv".

MATLAB release MATLAB 5.3 (R11)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (10)
08 Jun 2004 Luigi Rosa

Other methods should be considered (Overlap-add method, overlap-save method,...) which use the linearity of this operator.

08 Jun 2004 concerned citizen

The output of this finction is normalized to +-1. In otherwords, >>output=output/max(abs(output));

08 Feb 2006 R Hu

Matlab function 'conv' is implemented rather fast itself.

01 Aug 2006 anony mouse

Matlab's conv function is nearly twice as fast as this one, at least in R2006a.

01 Aug 2006 anony mouse

This is actually faster if both signals are very large. If only one is large then Matlab's function wins.

23 Aug 2006 chandra sekhar  
06 Feb 2007 Charles Jackson

Fantastic. Sped up my code by a factor of 20.

Crashes if the output is all zero (because it tries to normalize the output to a maximum of 1). Very simple to fix this though.

10 May 2007 Ismail Al Anshori

Very impressive!
This can make my convolution reverb of my final assignment perform faster and faster.
Thanks a lot.

11 Nov 2007 Mike Cohen

500x improvement. nice work, thanks for sharing that. note that you need to comment out the normalization (last line of code) if the convolved values are meaningful.

06 Jul 2009 anjar si

according to my results are not appropriate, because the large value generated is not the same compared with conv.m

Please login to add a comment or rating.
Updates
10 Jun 2004

Something was left out in the help section of the function.

12 Jul 2004

Modify the comments in the m-file source code.

Tag Activity for this File
Tag Applied By Date/Time
dsp Stephen McGovern 22 Oct 2008 07:22:22
fast Stephen McGovern 22 Oct 2008 07:22:22
convolution Stephen McGovern 22 Oct 2008 07:22:22
fft Stephen McGovern 22 Oct 2008 07:22:22
ifft Stephen McGovern 22 Oct 2008 07:22:22
conv Stephen McGovern 22 Oct 2008 07:22:22
dtft Stephen McGovern 22 Oct 2008 07:22:22
fourier transform Stephen McGovern 22 Oct 2008 07:22:22
dft Stephen McGovern 22 Oct 2008 07:22:22
conv Rashmi 07 Jan 2010 10:07:54
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com