The first book to deliver broad coverage of the documented and undocumented object-oriented features of MATLAB, this guide aids readers in creating effective software. Eight basic functions are discussed: constructor, subsref, subsasgn, display, struct, fieldnames, get, and set. Also explored are inheritance topics and the Class Wizard, a powerful MATLAB class generation tool. The final section delves into advanced strategies, including vectorized classes, containers, static variables, and function fronts, protected visibility, and pass-by-reference visibility. Included is a CD-ROM with source code, enabling readers to experiment with modifications and apply new concepts.
Table of Contents:
Introduction. Group of Eight: Meeting MATLAB's Requirements. Member Variables and Member Functions. Changing the Rules in Appearance Only. Displaying an Object's State. fieldnames.m. struct.m. get.m, set.m. Simplifying Using get, set, fieldnames, and struct. Drawing a Shape. Building a Hierarchy: Constructor Redux. Constructing Simple Hierarchies with Inheritance. Object Arrays with Inheritance. Child Class Members. Constructing Simple Hierarchies with Composition. General Assignment and Mutator Helper Functions. Class Wizard. Class Wizard Versions of the Shape Hierarchy. Advanced Strategies: Composition and a Simple Container Class. Static Member Data and Singleton Objects. Pass-by-Reference Emulation. Dot Functions and Functors. Protected Member Variables and Functions. Potpourri for $100. Index.