function [ res ] = bandPassSef(data,Fs,Fc1,Fc2)
%BANDPASSSEF Summary of this function goes here
% Detailed explanation goes here
%Fs = 48000; % Sampling Frequency
N = 100; % Order
%Fc1 = 12000; % First Cutoff Frequency
%Fc2 = 17000; % Second Cutoff Frequency
flag = 'scale'; % Sampling Flag
% Create the window vector for the design algorithm.
%win = blackman(N+1);
win=hamming(N+1);
% Calculate the coefficients using the FIR1 function.
%b = fir1(N,Fc1/(Fs/2),'high',win,flag);
b = fir1(N, [Fc1 Fc2]/(Fs/2), 'bandpass', win, flag);
Hd = dfilt.dffir(b);
res = filter(Hd, data);
end
mtalab-fir1 带通滤波
最新推荐文章于 2024-06-30 21:00:41 发布