-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEllipticFilter.m
27 lines (21 loc) · 914 Bytes
/
EllipticFilter.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
function Hd = EllipticFilter
%ELLIPTICFILTER Returns a discrete-time filter object.
% MATLAB Code
% Generated by MATLAB(R) 9.14 and DSP System Toolbox 9.16.
% Generated on: 02-Apr-2023 18:06:29
% Elliptic Bandstop filter designed using FDESIGN.BANDSTOP.
% All frequency values are in Hz.
Fs = 44100; % Sampling Frequency
Fpass1 = 6300; % First Passband Frequency
Fstop1 = 7350; % First Stopband Frequency
Fstop2 = 14700; % Second Stopband Frequency
Fpass2 = 17640; % Second Passband Frequency
Apass1 = 1; % First Passband Ripple (dB)
Astop = 50; % Stopband Attenuation (dB)
Apass2 = 1; % Second Passband Ripple (dB)
match = 'both'; % Band to match exactly
% Construct an FDESIGN object and call its ELLIP method.
h = fdesign.bandstop(Fpass1, Fstop1, Fstop2, Fpass2, Apass1, Astop, ...
Apass2, Fs);
Hd = design(h, 'ellip', 'MatchExactly', match);
% [EOF]