function  try_filter (x, A, B)

% Filter multiple copies of the input signal with the filter, to get rid of
% the transient

copies = 100;

x = x(:)';    % Make sure x a row vector
n = length(x);
x2 = repmat(x, 1, copies);
y2 = filter(B, A, x2);
y = y2( ((copies-1)*n) + 1 : (copies * n));

figure(1);

subplot(3, 1, 1);
plot(x);
grid on;
title('input');


subplot(3, 1, 2);
plot(y);
grid on;
title('output');


subplot(3, 1, 3);
plot(y-x);
grid on;
title('diff difference');

% Taking the diff didn't help:
%plot(diff(y-x));
%title('diff difference');

% subplot(4, 1, 4);
% plot(y2(1:n));
% title('transient');
