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

Download this file

49 lines (43 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
43
44
45
46
47
function L = nodeInLen(nodeNo,inLen,doNoExt,wt)
%NODEINLEN Length of the node input signal
% Usage: L = nodeInLen(nodeNo,inLen,doExt,treeStruct);
%
% Input parameters:
% nodeNo : Node index.
% inLen : Filter thee input signal length.
% 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
%
L = zeros(numel(nodeNo),1);
for nn=1:length(nodeNo)
subPat = [];
filtLenPat = [];
tmpNodeNo = nodeNo(nn);
while(wt.parents(tmpNodeNo))
parentNo = wt.parents(tmpNodeNo);
tmpIdx = find(wt.children{parentNo}==tmpNodeNo);
subPat(end+1) = wt.nodes{parentNo}.a(tmpIdx);
filtLenPat(end+1) = length(wt.nodes{parentNo}.g{tmpIdx}.h);
tmpNodeNo=parentNo;
end
subPat = subPat(end:-1:1);
filtLenPat = filtLenPat(end:-1:1);
L(nn) = inLen;
if(~doNoExt)
for ii=1:length(subPat)
L(nn) = floor((L(nn)+filtLenPat(ii)-1)/subPat(ii));
end
else
for ii=1:length(subPat)
L(nn) = ceil(L(nn)/subPat(ii));
end
end
end

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

Sign up for the SourceForge newsletter:





No, thanks