diff -r 586972e3ea7a scripts/signal/fftfilt.m --- a/scripts/signal/fftfilt.m Wed Apr 03 18:23:36 2013 -0500 +++ b/scripts/signal/fftfilt.m Thu Apr 04 16:12:53 2013 -0500 @@ -101,21 +101,14 @@ ## - If b is real and x is imaginary, y should be imaginary. ## - If b is imaginary and x is real, y should be imaginary. ## - If both b and x are imaginary, y should be real. - xisreal = zeros (1,size(x,2)); - xisimag = xisreal; - for cx = 1:size(x,2) - if (all (imag (x(:,cx)) == 0)) - xisreal (cx) = 1; - elseif (all (real (x (:,cx)) == 0)) - xisimag (cx) = 1; - endif - endfor - xisreal = find(xisreal); - xisimag = find(xisimag); if (all (imag (b) == 0)) + xisreal = all (imag (x) == 0); + xisimag = all (real (x) == 0); y (:,xisreal) = real (y (:,xisreal)); y (:,xisimag) = complex (real (y (:,xisimag)) * 0, imag (y (:,xisimag))); elseif (all (real (b) == 0)) + xisreal = all (imag (x) == 0); + xisimag = all (real (x) == 0); y (:,xisreal) = complex (real (y (:,xisreal)) * 0, imag (y (:,xisreal))); y (:,xisimag) = real (y (:,xisimag)); endif