1
function [AF,BF]=dtwfbbounds(dualwt,L)
3
%@deftypefn {Function} dtwfbbounds
5
%DTWFBBOUNDS Frame bounds of DTWFB
6
% Usage: fcond=dtwfbbounds(dualwt,L);
7
% [A,B]=dtwfbbounds(dualwt,L);
8
% [...]=dtwfbbounds(dualwt);
10
% DTWFBBOUNDS(dualwt,L) calculates the ratio B/A of the frame bounds
11
% of the dual-tree filterbank specified by dualwt for a system of
12
% length L. The ratio is a measure of the stability of the system.
14
% DTWFBBOUNDS(dualwt) does the same thing, but L is the next compatible
15
% length bigger than the longest filter in the identical filterbank.
17
% [A,B]=DTWFBBOUNDS(...) returns the lower and upper frame bounds
20
% See DTWFB for explanation of parameter dualwt.
24
%@strong{Url}: @url{http://ltfat.github.io/doc/wavelets/dtwfbbounds.html}
25
%@seealso{dtwfb, filterbankbounds}
28
% Copyright (C) 2005-2015 Peter L. Soendergaard <peter@sonderport.dk>.
29
% This file is part of LTFAT version 2.1.0
31
% This program is free software: you can redistribute it and/or modify
32
% it under the terms of the GNU General Public License as published by
33
% the Free Software Foundation, either version 3 of the License, or
34
% (at your option) any later version.
36
% This program is distributed in the hope that it will be useful,
37
% but WITHOUT ANY WARRANTY; without even the implied warranty of
38
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39
% GNU General Public License for more details.
41
% You should have received a copy of the GNU General Public License
42
% along with this program. If not, see <http://www.gnu.org/licenses/>.
44
% AUTHOR: Zdenek Prusa
46
complainif_notenoughargs(nargin,1,'DTWFBBOUNDS');
48
dualwt = dtwfbinit({'strict',dualwt},'nat');
55
if L~=wfbtlength(L,dualwt)
56
error(['%s: Specified length L is incompatible with the length of ' ...
57
'the time shifts.'],upper(mfilename));
61
% Do the equivalent filterbank using multirate identity property
62
[gmultid,amultid] = dtwfb2filterbank(dualwt,'complex');
65
L = wfbtlength(max(cellfun(@(gEl) numel(gEl.h),gmultid)),dualwt);
69
% Do the equivalent uniform filterbank
70
[gu,au] = nonu2ufilterbank(gmultid,amultid);
73
AF = filterbankbounds(gu,au,L);
75
[AF, BF] = filterbankbounds(gu,au,L);