This preview shows page 1. Sign up to view the full content.
Unformatted text preview: y = zeros(size(x)); % Create output vector % % Compute coefficients of notch filter a1 =pole_mag*(2*cos(omega_notch)); a2 = pole_mag*pole_mag; b0 = 1; b1 = -2*cos(omega_notch); b2 = 1; % % FILTER DATA % y(1) = b0*x(1); % Start filter at beginning of signal y(2) = -a1*y(1) + b0*x(2) + b1*x(1); for n=3:xlen y(n) = a1*y(n-1)-a2*y(n-2)+b0*x(n)+b1*x(n-1)+b2*x(n-2); % Recursive difference equation (Direct Form I) implementation end % DONE!...
View Full Document
This note was uploaded on 01/22/2011 for the course ECE 410 taught by Professor Staff during the Spring '08 term at University of Illinois, Urbana Champaign.
- Spring '08