% Filter Yn = Xn + X(n-1) plot the Impulse response and the frequency response. % Measure the gain at DC, 2K, 4K, 6K and 8K. % Measure the max and min gain and where they occur, the bandwidth if applicable and % the roll off rate Determine what type of filter it is. % f=f*(180/pi); % h is in rad/sample by default clear a=[1]; b=[1 1]; % 1*Xn + 1*X(n-1) %impz(b,a) % impuls response [h,f,units]=freqz(b,a,500); Mag=abs(h); Ang=angle(h); plot(f,Mag);title('Frequency vs Gain');