www.gusucode.com > dsp 案例源码程序 matlab代码 > dsp/ButterworthBandstopFilterExample.m

    %% Butterworth Bandstop Filter
% Create a Butterworth bandstop filter for data sampled at 10 kHz. The
% stopband is [1,1.5] kHz. The order of the filter is 20. Visualize the
% frequency response.

%%

d = fdesign.bandstop('N,F3dB1,F3dB2',20,1e3,1.5e3,1e4);
Hd = design(d,'butter');

fvtool(Hd)

%%
% Zoom in on the magnitude response plot to verify that the 3-dB down
% points are located at 1 and 1.5 kHz.

axis([0.5 2 -5 2])