diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-05-08 09:27:54 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-05-08 09:27:54 +0200 |
commit | 60a853f499da45a6329e6416750e3853fa28cbe6 (patch) | |
tree | 874d26b44e263331f5500f3fda385721ebf89c48 | |
parent | d5e1b113bcab2d22260446b87ef3251f7eeb7943 (diff) | |
download | dmc-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.m | 4 |
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 |