To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / _FullBNT / BNT / CPDs / @tabular_kernel / set_fields.m @ 8:b5b38998ef3b
History | View | Annotate | Download (399 Bytes)
| 1 |
function K = set_params_kernel(K, name, val) |
|---|---|
| 2 |
% SET_PARAMS_KERNEL Accessor function for a field (table_kernel) |
| 3 |
% K = set_params_kernel(K, name, val) |
| 4 |
% |
| 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 |
| 6 |
|
| 7 |
% We should check if the arguments are valid... |
| 8 |
|
| 9 |
switch name |
| 10 |
case 'table', K.table = val; |
| 11 |
otherwise, |
| 12 |
error(['invalid field name ' name]); |
| 13 |
end |