Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % Projektujemy 5 filtrow o rzedach od 1 do 5 i wyswieltamy ocj charakterystyki amplitudowe na jednym wykresie
- w=logspace(-2,2,1000);
- s=i*w;
- [a1,b1]=butter(1,1,'s');
- figure(1);
- y1=polyval(a1,s)./polyval(b1,s);
- h1=abs(y1);
- loglog(w,h1);
- hold on;
- [a2,b2]=butter(2,1,'s');
- y2=polyval(a2,s)./polyval(b2,s);
- h2=abs(y2);
- loglog(w,h2);
- [a3,b3]=butter(3,1,'s');
- y3=polyval(a3,s)./polyval(b3,s);
- h3=abs(y3);
- loglog(w,h3);
- [a4,b4]=butter(4,1,'s');
- y4=polyval(a4,s)./polyval(b4,s);
- h4=abs(y4);
- loglog(w,h4);
- [a5,b5]=butter(5,1,'s');
- y5=polyval(a5,s)./polyval(b5,s);
- h5=abs(y5);
- loglog(w,h5);
- hold off
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement