Reputation: 79
I am relatively new to using MATLAB filters. I am trying to filter a fairly large data set (about 2 million data points) using the following commands
rrc = rcosdesign(0.25, 10, floor(Fs/symRate), 'sqrt');
filtered = filter(rrc, 1, samples);
filtered = filtered / sqrt(floor(Fs/symRate));
When I run the MATLAB Profiler, it says the line
filtered = filter(rrc, 1, samples);
takes over 500 seconds to run. Any ideas on how to speed this up? I have tried using a FilterM function I found online ( http://www.mathworks.com/matlabcentral/fileexchange/32261-filterm ) but it takes the same amount of time. Anyone else have any ideas?
Thanks in advance
Upvotes: 0
Views: 1227
Reputation: 4963
Few Ideas:
conv2
which uses Intel IPP which might speed things up. Use the 'valid' flag to get filter
results.xcorr
as it uses FFT to speed up correlations. Since you're after filtering, remember to flip your filter coefficients.filterX
using Visual Studio 2013 or even better Intel C Compiler 2013 with optimization flags (/03
). When using it, use the filterX
command directly (Skip FilterM
wrapper).Any of these should help considerably.
Upvotes: 2