annotate toolboxes/FullBNT-1.0.7/bnt/general/dispcpt.m @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 function display_CPT(CPT)
Daniel@0 2
Daniel@0 3 n = ndims(CPT);
Daniel@0 4 parents_size = size(CPT);
Daniel@0 5 parents_size = parents_size(1:end-1);
Daniel@0 6 child_size = size(CPT,n);
Daniel@0 7 c = 1;
Daniel@0 8 for i=1:prod(parents_size)
Daniel@0 9 parent_inst = ind2subv(parents_size, i);
Daniel@0 10 fprintf(1, '%d ', parent_inst);
Daniel@0 11 fprintf(1, ': ');
Daniel@0 12 index = num2cell([parent_inst 1]);
Daniel@0 13 index{n} = ':';
Daniel@0 14 fprintf(1, '%6.4f ', CPT(index{:}));
Daniel@0 15 fprintf(1, '\n');
Daniel@0 16 end