Programming Previous page   Next Page

The Asset subsref Method

The subsref method provides access to the data contained in an asset object using one-based numeric indexing and structure field name indexing. The outer switch statement determines if the index is a numeric or field name syntax. The inner switch statements map the index to the appropriate value.

MATLAB calls subsref whenever you make a subscripted reference to an object (e.g., A(i), A{i}, or A.fieldname).

See the The Stock subsref Method for an example of how the child subsref method calls the parent subsref method.


Previous page  The Asset set Method The Asset subsasgn Method Next page

© 1994-2005 The MathWorks, Inc.