-
Notifications
You must be signed in to change notification settings - Fork 0
/
filtMUA.m
30 lines (23 loc) · 1.04 KB
/
filtMUA.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
29
30
function Hd = filtMUA
%FILTMUA Returns a discrete-time filter object.
% MATLAB Code
% Generated by MATLAB(R) 9.1 and the Signal Processing Toolbox 7.3.
% Generated on: 20-Dec-2020 13:36:21
% FIR Window Bandpass filter designed using the FIR1 function.
% All frequency values are in Hz.
Fs = 10000; % Sampling Frequency
Fstop1 = 299; % First Stopband Frequency
Fpass1 = 300; % First Passband Frequency
Fpass2 = 3000; % Second Passband Frequency
Fstop2 = 3001; % Second Stopband Frequency
Dstop1 = 0.01; % First Stopband Attenuation
Dpass = 0.057501127785; % Passband Ripple
Dstop2 = 0.01; % Second Stopband Attenuation
flag = 'scale'; % Sampling Flag
% Calculate the order from the parameters using KAISERORD.
[N,Wn,BETA,TYPE] = kaiserord([Fstop1 Fpass1 Fpass2 Fstop2]/(Fs/2), [0 ...
1 0], [Dstop1 Dpass Dstop2]);
% Calculate the coefficients using the FIR1 function.
b = fir1(N, Wn, TYPE, kaiser(N+1, BETA), flag);
Hd = dfilt.dffir(b);
% [EOF]