function y = block_filter (X,B); % function y = block_filter (X,B); % % block of filters with just one output. % X - matrix of signals to filter, size P x N % B - matrix of numerator coeffs (in lines), but LR-flipped P x L % (L is the length of filters). Actually, the coeffs are in order % to do rather a correlation than filtering ! % % initial conditions are zero. [P,N] = size (X); [P,L] = size (B); % prolong X with L-1 zeros X = [zeros(P,L-1) X]; % init the output y = zeros (1,N); for (ii=1:N) y(ii) = sum(sum(B .* X(:,ii:(ii+L-1)))); end