-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmake_bank.m
More file actions
25 lines (18 loc) · 733 Bytes
/
make_bank.m
File metadata and controls
25 lines (18 loc) · 733 Bytes
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
function [H,F] = make_bank(p,N)
% make-bank Generate Analysis Filter Bank using Cosine Modulation
% Synthesis Filters are Time-reversed of Analysis Filters
% Arguments:
% p Prototype filter (impulse response)
% N Number of subbands
%
% by Lee, Gan, and Kuo, 2008
% Subband Adaptive Filtering: Theory and Implementation
% Publisher: John Wiley and Sons, Ltd
L = length(p); % Length of prototype filter
H = zeros(N,L); % Analysis filter bank
n = 0:L-1; % Time index
% See Eq. (2.35) for the algorithm
for i = 0:N-1
H(i+1,:) = 2*p.*cos((pi/N)*(i+0.5)*(n-(L-1)/2)+ ((-1)^i)*(pi/4));
end
F = fliplr(H); % Synthesis filter bank