Programming Previous page   Next Page

The Stock get Method

The get method provides a way to access the data in the stock object using a "property name" style interface, similar to Handle Graphics. While in this example the property names are similar to the structure field name, they can be quite different. You could also choose to exclude certain fields from access via the get method or return the data from the same field for a variety of property names, if such behavior suits your design.

Note that the asset object is accessed via the stock object's asset field (s.asset). MATLAB automatically creates this field when the class function is called with the parent argument.


Previous page  The Stock Constructor Method The Stock set Method Next page

© 1994-2005 The MathWorks, Inc.