cantera/interfaces/matlab/toolbox/1D/@Stack/subsref.m

11 lines
240 B
Matlab

function b = subsref(s,index)
% SUBSREF -
switch index.type
case '()'
b = s.domains(index.subs{:});
case '.'
n = domainIndex(s, index.subs);
b = s.domains(n);
otherwise
error('syntax error');
end