

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
fir and iir filters in the experiment using matlab
Typology: Exercises
1 / 2
This page cannot be seen from the preview
Don't miss anything!


k=input('number of frequency points='); num=input('numerator coefficients='); den=input('denominator coefficients='); w=0:pi/(k-1):pi; h=freqz(num,den,w); subplot(2,2,1); stem(w/pi,abs(h));grid title('magnitude spectrum'); xlabel('\omega/\pi'); ylabel('magnitude'); subplot(2,1,2) plot(w/pi,angle(h));grid title('phase spectrum'); xlabel('\omega/\pi'); ylabel('phase,radians');