function y = butterbp35_250(x)
%-- Written by Peter Shawhan for CGWA summer school
b = 1.0e-04 * [0.025988611782317 0 -0.103954447129268 0 0.155931670693901 0 -0.103954447129268 0 0.025988611782317];
a = [ 1.000000000000000  -7.779562376017331  26.485661158316791 ...
 -51.540877882086299  62.704266216662873 -48.836823264484501 ...
   23.779543879656234  -6.618323739435467   0.806116007390170 ];

%-- Initialize the output
y = zeros(1,length(x));
%-- Calculate the first output specially because 'a' is not involved
y(1) = b(1)*x(1)/a(1);
%-- Loop 
for n=2:length(x)
  la = min(length(a),n);
  lb = min(length(b),n);
  y(n) = ( sum( b(1:lb).*fliplr(x(n-lb+1:n)) ) - sum( a(2:la).*fliplr(y(n-la+1:n-1)) ) ) / a(1);
end
