summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-05-08 09:27:54 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-05-08 09:27:54 +0200
commit60a853f499da45a6329e6416750e3853fa28cbe6 (patch)
tree874d26b44e263331f5500f3fda385721ebf89c48
parentd5e1b113bcab2d22260446b87ef3251f7eeb7943 (diff)
downloaddmc-60a853f499da45a6329e6416750e3853fa28cbe6.tar.gz
dmc-60a853f499da45a6329e6416750e3853fa28cbe6.tar.bz2
dmc-60a853f499da45a6329e6416750e3853fa28cbe6.zip
remove_sevenday_frequency.m: Use binary operations where possible
-rw-r--r--remove_sevenday_frequency.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/remove_sevenday_frequency.m b/remove_sevenday_frequency.m
index e0233cc..26cc35b 100644
--- a/remove_sevenday_frequency.m
+++ b/remove_sevenday_frequency.m
@@ -1,9 +1,9 @@
function [ret, removed] = remove_sevenday_frequency(quantity)
A = fft(sum(quantity'));
- kickout = (abs(A) > 2500) .* (abs(A) < 20000);
+ kickout = (abs(A) > 2500) & (abs(A) < 20000);
f = fft(quantity);
removed = diag(kickout) * f;
- ret = real(ifft(diag(1-kickout) * f));
+ ret = real(ifft(diag(~kickout) * f));
end