subsref.m

来自「这是一个很适合研究和学习用的电力系统仿真软件」· M 代码 · 共 24 行

M
24
字号
function b = subsref(a,index)

switch index(1).type
 case '.'
  switch index(1).subs
   case 'con'
    if length(index) == 2
      b = a.con(index(2).subs{:});
    else
      b = a.con;
    end
   case 'bus'
    b = a.bus;
   case 'n'
    b = a.n;
   case 'pod'
    b = a.pod;
   case 'ist'
    b = a.ist;
   case 'Vref'
    b = a.Vref;
  end
end

⌨️ 快捷键说明

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