%% Bandstop Elliptic Filter
% Design a 6th-order elliptic bandstop filter with normalized edge frequencies of 0.2\pi and 0.6\pi rad/sample, 5 dB of passband ripple, and 50 dB of stopband attenuation. Plot its magnitude and phase responses. Use it to filter random data.

[b,a] = ellip(3,5,50,[0.2 0.6],'stop');
freqz(b,a)
dataIn = randn(1000,1);
dataOut = filter(b,a,dataIn);

% Copyright 2015 The MathWorks, Inc.