[34f3ea]: filterbank / filterbankresponse.m  Maximize  Restore  History

Download this file

42 lines (34 with data), 1.3 kB

 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
31
32
33
34
35
36
37
38
39
40
41
function gf=filterbankresponse(g,a,L,varargin)
%FILTERBANKRESPONSE Response of filterbank as function of frequency
% Usage: gf=filterbankresponse(g,a,L);
%
% `filterbankresponse(g,a,L)` computes the total response in frequency of
% a filterbank specified by *g* and *a* for a signal length of
% *L*. This corresponds to summing up all channels. The output is a
% usefull tool to investigate the behaviour of the windows, as peaks
% indicate that a frequency is overrepresented in the filterbank, while
% a dip indicates that it is not well represented.
%
% In mathematical terms, this function computes the diagonal of the
% Fourier transform of the frame operator.
%
% `filterbankresponse(g,a,L,'real')` does the same for a filterbank
% intended for positive-only filterbank.
%
% See also: filterbank, filterbankbounds
definput.flags.ctype={'complex','real'};
definput.flags.plottype={'plot','noplot'};
[flags,kv]=ltfatarghelper({},definput,varargin);
% G1 is done this way just so that we can determine the data type.
G1=comp_transferfunction(g{1},L);
gf=abs(G1).^2;
M=numel(g);
for m=2:M
gf=gf+abs(comp_transferfunction(g{m},L)).^2;
end;
if flags.do_real
gf=gf+involute(gf);
end;
if flags.do_plot
plotfft(gf,'lin');
end;

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks