subsref.m

来自「Nonlinear dynamical factor analysis Matl」· M 代码 · 共 31 行

M
31
字号
function b = subsref(a, index)% SUBSREF implement subscripted reference 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.switch index(1).type case '.'  switch index(1).subs   case 'e'    b = a.e;   case 'var'    b = a.var;   otherwise    error(sprintf('Probdist object does not have element %s', index(1).subs))  end case '()'  b = probdist(a.e(index(1).subs{:}), a.var(index(1).subs{:})); otherwise  error('Unsupported function')end% Handle possible other references recursivelyif length(index) > 1  b = subsref(b, index(2:end));end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?