summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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