Skip to Main Content Skip to Search
Product 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).

See Also

subsasgn | subsasgn

Tutorials

  


Free MATLAB Interactive Kit

Explore how to use MATLAB to make advancements in engineering and science.


Download free kit

Trials Available

Try the latest version of MATLAB and other MathWorks products.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS