-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpost_check.m
30 lines (27 loc) · 925 Bytes
/
post_check.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
clc
ctr = 0;
n_nodes = 5;
observed = [];
for k = 1:N
for c = 1
total = 0;
% disp('Current location-----');
for i = 1:n_nodes
next = (i-1)*n_nodes;
xi_idx = i:n_nodes:n_nodes^2;
if value(sum(xi{c}(xi_idx,k)))
disp([num2str(i) ' | ' num2str(xi_idx) ' | ' num2str(next+1:next+n_nodes)]);
disp('From:');
disp(find(value(xi{c}(:,k)) == 1));
disp('To: ');
disp(find(value(xi{c}(:,k+1)) == 1));
disp(['Gamma: ' num2str(value(gam(c,k))) ' | ' 'xi: ' num2str(value(sum(xi{c}(xi_idx,k))))]);
end
if value(gam(c,k)) && value(sum(xi{c}(xi_idx,k)))
E(:,i)
observed = [observed, value(xi{c}(next+1:next+n_nodes,k+1)'*E(:,i))];
end
end
end
end
disp(observed');