Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Hd = filter_notch
- Fs=500; Fnotch=50; BW=1; Apass=1;
- [b, a] = iirnotch(Fnotch/(Fs/2), BW/(Fs/2), Apass);
- Hd = dfilt.df2(b, a);
- >> freqz(filter_notch);
- >> fs=500;
- >> f_range=linspace(0,fs/2,2048);
- >> h=freqz(filter_notch,f_range,fs);
- >> hdb=20*log10(abs(h));
- >> plot(f_range,hdb)
- 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