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