Documentation

subsindex

Subscript indexing with object

Syntax

ind = subsindex(A)

Description

ind = subsindex(A) called by MATLAB® for the expression X(A) when A is an object, unless such an expression results in a call to an overloaded subsref or subsasgn method for X. subsindex must return the value of the object as a zero-based integer index. (ind must contain integer values in the range 0 to prod(size(X))-1.) Call subsindex directly from an overloaded subsref or subsasgn method.

MATLAB invokes subsindex separately on all the subscripts in an expression, such as X(A,B).

Introduced before R2006a

Was this topic helpful?