annotate toolboxes/FullBNT-1.0.7/bnt/CPDs/@tabular_kernel/set_fields.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 K = set_params_kernel(K, name, val)
wolffd@0 2 % SET_PARAMS_KERNEL Accessor function for a field (table_kernel)
wolffd@0 3 % K = set_params_kernel(K, name, val)
wolffd@0 4 %
wolffd@0 5 % e.g., K = set_params_kernel(K, 'table', rand(2,3,2)) for a kernel on 3 nodes with 2,3,2 values each
wolffd@0 6
wolffd@0 7 % We should check if the arguments are valid...
wolffd@0 8
wolffd@0 9 switch name
wolffd@0 10 case 'table', K.table = val;
wolffd@0 11 otherwise,
wolffd@0 12 error(['invalid field name ' name]);
wolffd@0 13 end