File Exchange

image thumbnail

Fast Convolution

version 1.0 (1.4 KB) by

Convolves two extremely large vectors in reasonable time.

4.57143
7 Ratings

25 Downloads

Updated

View License

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".

Comments and Ratings (13)

Ali Jadoon

Try this one too!!
File ID: #45945

Ryan Muir

This function normalizes the output, which I did not want. Commenting out the last line in the script took care of that (the program is only 10 or 15 lines long). After that, this generated output that is identical to the native conv() function, and did it orders of magnitude faster. Thanks! =)

Drew Weymouth

This is really great for implementing convolution reverb. Thanks!

anjar si

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

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.

Ismail Al Anshori

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

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.

chandra sekhar

anony mouse

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

anony mouse

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

R Hu

Matlab function 'conv' is implemented rather fast itself.

concerned citizen

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

Luigi Rosa

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

Updates

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

MATLAB Release
MATLAB 5.3 (R11)

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

» Watch video