Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear all
- close all
- clc
- Rp=1;
- Rs=50;
- Wod=16000;
- Wp=[2000 3500];
- Ws=[1700 3800];
- Nfft=2048;
- wosa=0:Wod/Nfft:Wod/2;
- [n,Wn]=cheb2ord(Wp, Ws, Rp, Rs, 's');
- [b,a]=cheby2(n,Rs,Ws,'s');
- h=freqs(b,a,wosa);
- figure(1)
- plot(wosa,20*log10(abs(h)),'--');
- hold all
- fs=Wod/pi;
- ft=(2000+3500)/2/(2*pi);
- [bz,az]=bilinear(b,a,fs,ft);
- [hz,fz]=freqz(bz,az,Nfft/2+1,fs);
- plot(fz*2*pi,20*log10(abs(hz)));
- xlim([0 8000]);
- legend('analogni','digitalni');
- title('amplitudske karakteristike analognog i digitalnog filtra');
- xlabel('W[rad/s]');
- ylabel('|h|,|hz| [dB]');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement