From 60a853f499da45a6329e6416750e3853fa28cbe6 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Tue, 8 May 2012 09:27:54 +0200 Subject: remove_sevenday_frequency.m: Use binary operations where possible --- remove_sevenday_frequency.m | 4 ++-- 1 file 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 -- cgit