www.gusucode.com > signal 案例源码程序 matlab代码 > signal/DiscreteTimeRepresentationOfAnEllipticFilterExample.m

    %% Discrete-Time Representation of an Elliptic Filter
% Design a 6th-order elliptic analog lowpass filter with 5 dB of ripple in
% the passband and a stopband 90 dB down. Use |bilinear| to transform it to
% a discrete-time IIR filter.
%%

% Copyright 2015 The MathWorks, Inc.

Fs = 0.5;                             % Sampling frequency
[z,p,k] = ellipap(6,5,90);            % Lowpass filter prototype
[num,den] = zp2tf(z,p,k);             % Convert to transfer function form
[numd,dend] = bilinear(num,den,Fs);   % Analog to digital conversion
fvtool(numd,dend)                     % Visualize the filter