Advertisement
Guest User

asd

a guest
Jan 19th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.66 KB | None | 0 0
  1. % Projektujemy 5 filtrow o rzedach od 1 do 5  i wyswieltamy ocj charakterystyki amplitudowe na jednym wykresie  
  2. w=logspace(-2,2,1000);
  3. s=i*w;  
  4.  
  5. [a1,b1]=butter(1,1,'s');  
  6. figure(1);
  7. y1=polyval(a1,s)./polyval(b1,s);  
  8. h1=abs(y1);  
  9. loglog(w,h1);  
  10. hold on;
  11.  
  12. [a2,b2]=butter(2,1,'s');
  13. y2=polyval(a2,s)./polyval(b2,s);  
  14. h2=abs(y2);  
  15. loglog(w,h2);  
  16.  
  17.  
  18. [a3,b3]=butter(3,1,'s');  
  19. y3=polyval(a3,s)./polyval(b3,s);  
  20. h3=abs(y3);  
  21. loglog(w,h3);  
  22.  
  23.  
  24. [a4,b4]=butter(4,1,'s');  
  25. y4=polyval(a4,s)./polyval(b4,s);  
  26. h4=abs(y4);  
  27. loglog(w,h4);  
  28.  
  29. [a5,b5]=butter(5,1,'s');  
  30. y5=polyval(a5,s)./polyval(b5,s);  
  31. h5=abs(y5);  
  32. loglog(w,h5);  
  33. hold off
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement