-
Notifications
You must be signed in to change notification settings - Fork 0
/
isig.m
35 lines (35 loc) · 1.02 KB
/
isig.m
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
function [wq, wqsign] = isig(wq, wqsign, sig, thresh)
layer = 1;
sigidx = 1;
wzt = samestruct(wq, 0);
while layer <= size(wq{1},3)
subidx = 1;
ldone = 0;
while subidx <= length(wq) && ~ldone
[r,c,~]=size(wq{subidx});
i = 1;
while i <= r && ~ldone
j = 1;
while j <= c && ~ldone
if ~wzt{subidx}(i,j,layer)
symbol = sig(sigidx);
if any(symbol == [-1 1])
wqsign{subidx}(i,j,layer) = symbol;
wq{subidx}(i,j,layer) = thresh;
elseif symbol == 2
wzt = setzt(wzt,subidx,i,j,layer);
end
sigidx = sigidx + 1;
if sig(sigidx) == 3
ldone = 1;
sigidx = sigidx + 1;
end
end
j = j +1;
end
i = i +1;
end
subidx = subidx + 1;
end
layer = layer +1;
end