www.gusucode.com > bigdata 工具箱 matlab源码程序 > bigdata/@tall/numArgumentsFromSubscript.m
function sz = numArgumentsFromSubscript(t, s, context) %numArgumentsFromSubscript Overloaded for tall arrays. % Copyright 2016 The MathWorks, Inc. if isscalar(s) % one level of subscripting on a table sz = 1; % tall (incl. table) returns one array for parens, braces, and dot % If we supported brace indexing on a tall cell, we'd have to change that. elseif context == matlab.mixin.util.IndexingContext.Assignment sz = 1; % tall (table) subsasgn only ever accepts one rhs value elseif strcmp(s(end).type,'()') % This should never be called with parentheses as the last % subscript, but return 1 for that just in case sz = 1; else % multiple subscripting levels % perform one level of indexing, then forward result to builtin numArgumentsFromSubscript x = subsref(t, s(1)); sz = numArgumentsFromSubscript(x,s(2:end),context); end end