diff toolboxes/FullBNT-1.0.7/bnt/general/dispcpt.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/toolboxes/FullBNT-1.0.7/bnt/general/dispcpt.m	Tue Feb 10 15:05:51 2015 +0000
@@ -0,0 +1,16 @@
+function display_CPT(CPT)
+
+n = ndims(CPT);
+parents_size = size(CPT);
+parents_size = parents_size(1:end-1);
+child_size = size(CPT,n);
+c = 1;
+for i=1:prod(parents_size)
+  parent_inst = ind2subv(parents_size, i);
+  fprintf(1, '%d ', parent_inst);
+  fprintf(1, ': ');
+  index = num2cell([parent_inst 1]);
+  index{n} = ':';
+  fprintf(1, '%6.4f ', CPT(index{:}));
+  fprintf(1, '\n');
+end