Diff of /filterbank/filterbanktight.m [34f3ea] .. [931198]  Maximize  Restore

Switch to unified view

a/filterbank/filterbanktight.m b/filterbank/filterbanktight.m
1
function gtout=filterbanktight(g,a,varargin);
1
function gtout=filterbanktight(g,a,L);
2
%FILTERBANKTIGHT  Tight filters
2
%FILTERBANKTIGHT  Tight filters
3
%   Usage:  gt=filterbanktight(g,a);
3
%   Usage:  gt=filterbanktight(g,a);
4
%
4
%
5
%   `filterabanktight(g,a)` computes the canonical tight filters of *g* for a
5
%   `filterabanktight(g,a)` computes the canonical tight filters of *g* for a
6
%   channel subsampling rate of *a* (hop-size).
6
%   channel subsampling rate of *a* (hop-size).
...
...
16
16
17
if nargin<2
17
if nargin<2
18
  error('%s: Too few input parameters.',upper(mfilename));
18
  error('%s: Too few input parameters.',upper(mfilename));
19
end;
19
end;
20
20
21
[a,M,longestfilter,lcm_a]=assert_filterbankinput(g,a);
21
[g,info]=filterbankwin(g,a,L,'normal');
22
M=info.M;
22
23
23
definput.keyvals.L=[];
24
if (~isempty(L)) && (L~=filterbanklength(L,a))
24
[flags,kv,L]=ltfatarghelper({'L'},definput,varargin);
25
    error(['%s: Specified length L is incompatible with the length of ' ...
25
26
           'the time shifts.'],upper(mfilename));
26
if isempty(L)
27
  L=ceil(longestfilter/lcm_a)*lcm_a;
28
end;
27
end;
29
28
30
[g,info]=filterbankwin(g,a,L,'normal');
29
[g,info]=filterbankwin(g,a,L,'normal');
31
M=info.M;
30
M=info.M;
32
31
...
...
72
  for m=1:M
71
  for m=1:M
73
    gtout{m}=cast(gt(:,m),thisclass);
72
    gtout{m}=cast(gt(:,m),thisclass);
74
  end;
73
  end;
75
  
74
  
76
else
75
else
77
76
    
78
  error('Not implemented yet.');  
77
    if info.ispainless
78
        Fsqrt=sqrt(filterbankresponse(g,a,L));
79
        
80
        gdout=cell(1,M);
81
        for m=1:M
82
            thisgt=struct();
83
            thisgt.H=comp_transferfunction(g{m},L)./Fsqrt;
84
            thisgt.foff=0;
85
            thisgt.realonly=0;
86
            thisgt.delay=0;
87
            
88
            gtout{m}=thisgt;
89
        end;
90
        
91
    else
92
        error(['%s: The canonical dual frame of this system is not a ' ...
93
               'filterbank. You must call an iterative ' ...
94
               'method to perform the desired inverstion. Please see ' ...
95
               'FRANAITER or FRSYNITER.'],upper(mfilename));                
96
    end;
79
  
97
  
80
end;
98
end;

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

Sign up for the SourceForge newsletter:





No, thanks