To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Revision:

root / _FullBNT / BNT / general / dispcpt.m @ 8:b5b38998ef3b

History | View | Annotate | Download (382 Bytes)

1
function display_CPT(CPT)
2

    
3
n = ndims(CPT);
4
parents_size = size(CPT);
5
parents_size = parents_size(1:end-1);
6
child_size = size(CPT,n);
7
c = 1;
8
for i=1:prod(parents_size)
9
  parent_inst = ind2subv(parents_size, i);
10
  fprintf(1, '%d ', parent_inst);
11
  fprintf(1, ': ');
12
  index = num2cell([parent_inst 1]);
13
  index{n} = ':';
14
  fprintf(1, '%6.4f ', CPT(index{:}));
15
  fprintf(1, '\n');
16
end