Matlab Codes and Graphs
Autor: junaid shaikh • April 11, 2016 • Lab Report • 328 Words (2 Pages) • 1,007 Views
SOLUTION TO EXERCISE 1(a)
[num1,den1]=butter(1,1,'s');
[y1,w]=freqs(num1,den1);
y1=abs(y1);
[num2,den2]=butter(2,1,'s');
[y2,w]=freqs(num2,den2);
y2=abs(y2);
[num3,den3]=butter(3,1,'s');
[y3,w]=freqs(num3,den3);
y3=abs(y3);
[num4,den4]=butter(4,1,'s');
[y4,w] = freqs(num4,den4);
y4=abs(y4);
plot(w,y1,'g',w,y2,'r',w,y3,'b',w,y4,'k') ;
title('Junaid Shaikh, 05ES42') ;
[pic 1]
SOLUTION TO EXERCISE 1(b)
POLE-ZERO MAP OF FIRST ORDER
[num1,den1] =butter(1,1,'s');
pzmap(num1,den1)
grid;
title('Junaid Shaikh, 05ES42') ;
[pic 2]
POLE-ZERO MAP OD 2ND ORDER
[num2,den2] =butter(2,1,'s');
pzmap(num2,den2)
grid;
title('Junaid Shaikh, 05ES42') ;
[pic 3]
POLE-ZERO MAP OF 3rd ORDER
[num3,den3] =butter(3,1,'s');
pzmap(num3,den3)
grid;
title('Junaid Shaikh, 05ES42') ;
[pic 4]
POLE-ZERO MAP OF 4th ORDER
[num4,den4] = butter(4,1,'s');
pzmap(num4,den4)
grid;
title('Junaid Shaikh, 05ES42') ;
[pic 5]
SOLUTION OF EXERCISE 1(C)
[num1,den1]=butter(1,1,'high','s');
[num2,den2]=butter(2,1,'high','s');
[num3,den3]=butter(3,1,'high','s');
[y1,w]=freqs(num1,den1);
[y2,w]=freqs(num2,den2);
[y3,w]=freqs(num3,den3);
y1=abs(y1);
y2=abs(y2);
y3=abs(y3);
plot(w,y1,'g',w,y2,'k',w,y3,'m');
title('05ES42,Junaid Shaikh');
xlabel('Frequency in HZ') ;
ylabel('Magnitude Response');
[pic 6]
SOLUTION TO EXERCISE 1(d)
wn=[50 200];
[num1,den1]=butter(1,wn,'stop','s');
[y1,w]=freqs(num1,den1);
y1=abs(y1);
[num2,den2]=butter(2,wn,'stop','s');
[y2,w]=freqs(num2,den2);
...