-
Notifications
You must be signed in to change notification settings - Fork 1
/
Equaripple_4.m
28 lines (22 loc) · 879 Bytes
/
Equaripple_4.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
28
function Hd = Equaripple_4(input)
%B1 Returns a discrete-time filter object.
% MATLAB Code
% Generated by MATLAB(R) 8.2 and the Signal Processing Toolbox 6.20.
% Generated on: 25-Jan-2016 03:32:43
% Equiripple Bandpass filter designed using the FIRPM function.
% All frequency values are in Hz.
Fs = input; % Sampling Frequency
N = 100; % Order
Fstop1 = 590; % First Stopband Frequency
Fpass1 = 600; % First Passband Frequency
Fpass2 = 1000; % Second Passband Frequency
Fstop2 = 1010; % Second Stopband Frequency
Wstop1 = 1; % First Stopband Weight
Wpass = 1; % Passband Weight
Wstop2 = 1; % Second Stopband Weight
dens = 20; % Density Factor
% Calculate the coefficients using the FIRPM function.
b = firpm(N, [0 Fstop1 Fpass1 Fpass2 Fstop2 Fs/2]/(Fs/2), [0 0 1 1 0 ...
0], [Wstop1 Wpass Wstop2], {dens});
Hd = dfilt.dffir(b);
% [EOF]