daily pastebin goal
32%
SHARE
TWEET

Untitled

a guest Dec 18th, 2017 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. clear all
  2. close all
  3. clc
  4.  
  5. Rp=1;
  6. Rs=50;
  7. Wod=16000;
  8. Wp=[2000 3500];
  9. Ws=[1700 3800];
  10.  
  11. Nfft=2048;
  12. wosa=0:Wod/Nfft:Wod/2;
  13. [n,Wn]=cheb2ord(Wp, Ws, Rp, Rs, 's');
  14. [b,a]=cheby2(n,Rs,Ws,'s');
  15. h=freqs(b,a,wosa);              
  16.  
  17. figure(1)
  18. plot(wosa,20*log10(abs(h)),'--');
  19. hold all
  20.  
  21. fs=Wod/pi;
  22. ft=(2000+3500)/2/(2*pi);
  23. [bz,az]=bilinear(b,a,fs,ft);
  24. [hz,fz]=freqz(bz,az,Nfft/2+1,fs);
  25.  
  26. plot(fz*2*pi,20*log10(abs(hz)));
  27. xlim([0 8000]);
  28. legend('analogni','digitalni');
  29. title('amplitudske karakteristike analognog i digitalnog filtra');
  30. xlabel('W[rad/s]');
  31. ylabel('|h|,|hz| [dB]');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top