Skip to content

Commit 1ad0d4d

Browse files
committed
Merge branch 'master' of https://github.com/magland/mountainlab
2 parents 7824df5 + 8864ee5 commit 1ad0d4d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

matlab/processing/ms_bandpass_filter.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,20 +140,20 @@
140140
figure; subplot(2,1,1);
141141
showpowerspectrum(X,o.samplerate,wid); hold on;
142142
o.freq_min = 300; % high-pass only
143-
Y = ms_bandpass_filter(X,o);
143+
tic; Y = ms_bandpass_filter(X,o); toc
144144
Yc = run_mscmd(X,o);
145145
fprintf('max diff btw matlab and C: %.3g\n',max(max(abs(Y-Yc))))
146146
pad = 2e3; % empirical # timepts
147147
fprintf('max diff btw matlab and C ignoring end bits: %.3g\n',max(max(abs(Y(:,pad:end-pad)-Yc(:,pad:end-pad)))))
148148
showpowerspectrum(Y,o.samplerate,wid,'r-');
149149
o.freq_max = 6000; % band-pass
150-
Y = ms_bandpass_filter(X,o);
150+
tic; Y = ms_bandpass_filter(X,o); toc
151151
Yc = run_mscmd(X,o);
152152
fprintf('max diff btw matlab and C ignoring end bits: %.3g\n',max(max(abs(Y(:,pad:end-pad)-Yc(:,pad:end-pad)))))
153153
showpowerspectrum(Y,o.samplerate,wid,'k-');
154154
vline([o.freq_min,o.freq_max]); % check the -3dB pts
155155
o.freq_min = []; % low-pass only
156-
Y = ms_bandpass_filter(X,o);
156+
tic; Y = ms_bandpass_filter(X,o); toc
157157
Yc = run_mscmd(X,o);
158158
fprintf('max diff btw matlab and C ignoring end bits: %.3g\n',max(max(abs(Y(:,pad:end-pad)-Yc(:,pad:end-pad)))))
159159
showpowerspectrum(Y,o.samplerate,wid,'g-');

0 commit comments

Comments
 (0)