Programming Previous page   Next Page

The Asset get Method

The asset class needs methods to access the data contained in asset objects. The following function implements a get method for the class. It uses capitalized property names rather than literal field names to provide an interface similar to other MATLAB objects.

This function accepts an object and a property name and uses a switch statement to determine which field to access. This method is called by the subclass get methods when accessing the data in the inherited properties. See The Stock get Method for an example.


Previous page  The Asset Constructor Method The Asset set Method Next page

© 1994-2005 The MathWorks, Inc.