📄 subsasgn.m
字号:
function a = subsasgn(a, index, b)% SUBSASGN implement subscripted assignment for probdists% Copyright (C) 2002 Harri Valpola and Antti Honkela.%% This package comes with ABSOLUTELY NO WARRANTY; for details% see License.txt in the program package. This is free software,% and you are welcome to redistribute it under certain conditions;% see License.txt for details.% Handle possible other references recursivelyif (length(index) > 1) b = subsasgn(subsref(a, index(1)), index(2:end), b);endswitch index(1).type case '()' a.e(index(1).subs{:})=b.e; a.var(index(1).subs{:})=b.var; case '.' switch index(1).subs case 'e' a.e = b; case 'var' a.var = b; otherwise error(sprintf('Probdist object does not have element %s', index(1).subs)) end otherwise error('Unsupported function')end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -