1function Lc = treeOutLen(L,doNoExt,wt)
2%-*- texinfo -*-
3%@deftypefn {Function} treeOutLen
4%@verbatim
5%TREEOUTLEN  Lengths of tree subbands
6%   Usage:  Lc = treeOutLen(L,doNoExt,wt)
7%
8%   Input parameters:
9%         L       : Input signal length.
10%         doNoExt : Flag. Expansive = false, Nonexpansive=true
11%         wt      : Structure containing description of the filter tree.
12%
13%   Output parameters:
14%         Lc : Subband lengths.
15%
16%   Lc = TREEOUTLEN(L,doNoExt,wt) returns lengths of tree subbands given
17%   input signal length L and flag doNoExt. When true, the transform is
18%   assumed to be non-expansive.
19%   For definition of the structure see WFBINIT.
20%
21%
22%@end verbatim
23%@strong{Url}: @url{http://ltfat.github.io/doc/wavelets/wfbtmanip/treeOutLen.html}
24%@seealso{wfbtinit}
25%@end deftypefn
26
27% Copyright (C) 2005-2016 Peter L. Soendergaard <peter@sonderport.dk>.
28% This file is part of LTFAT version 2.3.1
29%
30% This program is free software: you can redistribute it and/or modify
31% it under the terms of the GNU General Public License as published by
32% the Free Software Foundation, either version 3 of the License, or
33% (at your option) any later version.
34%
35% This program is distributed in the hope that it will be useful,
36% but WITHOUT ANY WARRANTY; without even the implied warranty of
37% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
38% GNU General Public License for more details.
39%
40% You should have received a copy of the GNU General Public License
41% along with this program.  If not, see <http://www.gnu.org/licenses/>.
42
43
44
45[termN, rangeLoc, rangeOut] = treeBFranges(wt);
46slice = ~cellfun(@isempty,rangeOut); % Limit to nodes with unconnected outputs
47rangeOut=rangeOut(slice);
48cRange = cell2mat(cellfun(@(rEl) rEl(:),rangeOut(:),...
49                  'UniformOutput',0));
50
51Lctmp = nodesOutLen(termN(slice),L,rangeLoc(slice),doNoExt,wt);
52Lc = zeros(size(Lctmp));
53Lc(cRange) = Lctmp;
54
55
56
57
58
59
60
61
62