Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. function Hd = filter_notch
  2.  
  3. Fs=500; Fnotch=50; BW=1; Apass=1;
  4.  
  5. [b, a] = iirnotch(Fnotch/(Fs/2), BW/(Fs/2), Apass);
  6. Hd = dfilt.df2(b, a);
  7.  
  8. >> freqz(filter_notch);
  9.  
  10. >> fs=500;
  11. >> f_range=linspace(0,fs/2,2048);
  12. >> h=freqz(filter_notch,f_range,fs);
  13. >> hdb=20*log10(abs(h));
  14. >> plot(f_range,hdb)
  15.  
  16. h = freqz(___,f,fs) returns the frequency response vector, h, at the physical frequencies supplied in f.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement