[191c94]: wavelets / wfbtmanip / nodeOutLen.m  Maximize  Restore  History

Download this file

48 lines (38 with data), 1.4 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
42
function Lc = nodeOutLen(nodeNo,L,outRange,doNoExt,wt)
%NODEINLEN Length of the node output
% Usage: Lc = nodeInLen(nodeNo,inLen,doExt,wt);
%
% Input parameters:
% nodeNo : Node index(es).
% inLen : Filter thee input signal length.
% outRange : Cell array. Each element is a vector of local out.
% indexes.
% doNoExt : Expansive representation indicator.
% wt : Structure containing description of the filter tree.
%
% Output parameters:
% Lin : Length of the node input signal
%
% `nodeInLen(nodeNo,inLen,doExt,treeStruct)` return length of the input
% signal of the node `nodeNo`. For definition of the structure see `wfbinit`.
%
% See also: wfbtinit
%
if isempty(outRange)
outRange = cellfun(@(nEl) 1:numel(nEl.g),wt.nodes(nodeNo),'UniformOutput',0);
end
Lc = zeros(sum(cellfun(@numel,outRange)),1);
inLens = nodeInLen(nodeNo,L,doNoExt,wt);
Lcidx = 1;
for ii=1:numel(inLens)
nodeHlen = cellfun(@(nEl) numel(nEl.h),...
wt.nodes{nodeNo(ii)}.g(outRange{ii}));
nodea = wt.nodes{nodeNo(ii)}.a(outRange{ii});
if(~doNoExt)
Lc(Lcidx:Lcidx+numel(nodeHlen)-1) = floor((inLens(ii)...
+nodeHlen(:)-1)./nodea(:));
else
Lc(Lcidx:Lcidx+numel(nodeHlen)-1) = ceil(inLens(ii)./nodea(:));
end
Lcidx = Lcidx + numel(nodeHlen);
end