Mercurial > hg > camir-aes2014
annotate 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 |
rev | line source |
---|---|
wolffd@0 | 1 function display_CPT(CPT) |
wolffd@0 | 2 |
wolffd@0 | 3 n = ndims(CPT); |
wolffd@0 | 4 parents_size = size(CPT); |
wolffd@0 | 5 parents_size = parents_size(1:end-1); |
wolffd@0 | 6 child_size = size(CPT,n); |
wolffd@0 | 7 c = 1; |
wolffd@0 | 8 for i=1:prod(parents_size) |
wolffd@0 | 9 parent_inst = ind2subv(parents_size, i); |
wolffd@0 | 10 fprintf(1, '%d ', parent_inst); |
wolffd@0 | 11 fprintf(1, ': '); |
wolffd@0 | 12 index = num2cell([parent_inst 1]); |
wolffd@0 | 13 index{n} = ':'; |
wolffd@0 | 14 fprintf(1, '%6.4f ', CPT(index{:})); |
wolffd@0 | 15 fprintf(1, '\n'); |
wolffd@0 | 16 end |