A Guide to MATLAB Object-Oriented Programming

  • 7h 43m
  • Andy H. Register
  • Institution of Engineering and Technology
  • 2007

A Guide to MATLAB Object-Oriented Programming is the first book to deliver broad coverage of the documented and undocumented object-oriented features of MATLAB. Unlike the typical approach of other resources, this guide explains why each feature is important, demonstrates how each feature is used, and promotes an understanding of the interactions between features. Assuming an intermediate level of MATLAB programming knowledge, the book not only concentrates on MATLAB coding techniques but also discusses topics critical to general software development. It introduces fundamentals first before integrating these concepts into example applications. In the first section, the book discusses eight basic functions: constructor, subsref, subsasgn, display, struct, fieldnames, get, and set. Building on the previous section, it explores inheritance topics and presents the Class Wizard, a powerful MATLAB class generation tool. The final section delves into advanced strategies, including containers, static variables, and function fronts. With more than 20 years of experience designing and implementing object-oriented software, the expert author has developed an accessible and comprehensive book that aids readers in creating effective object-oriented software using MATLAB.

About the Author

Andy Register has been an admitted object-oriented fanatic since his first introduction to the concepts of object-oriented design in the late 1980s. At that time, he was working on his doctoral degree in electrical engineering at the Georgia Institute of Technology, Atlanta. His research involved the real-time control of nonminimum phase systems, human and hardware-in-the-loop simulations, state-of-the-art computer architectures, and low-level programming of multiple-instruction multiple-data (MIMD) parallel computers. Object-oriented programming was still in its infancy with a number of object-oriented contenders: Actor, C++, CLOS, Eiffel, Flavors, and Smalltalk, among others. Dr. Register needed a language that supported a close association between software and hardware, and he found the right combination of performance, utility, and elegance in C++. After using C++ for several years, he published his first two papers on object-oriented programming in 1994.

Fast-forward to the twenty-first century, and we find Dr. Register working at the Georgia Tech Research Institute in Atlanta on complex radar-tracking simulations. These simulations do not require a close association with hardware so that real-world interface requirements dictate much of the software design. In this environment, an object-oriented approach to MATLAB yields big advantages. Dr. Register brought his years of experience developing object-oriented C++ software to bear on MATLAB and developed a set of techniques and tools that allows a standard object-oriented design to peacefully coexist with MATLAB. In his day-to-day work, these techniques allow for interchangeable modules and the capability to add new features to a simulation. In this book, these techniques are described and Dr. Register’s Class Wizard tool is explained and demonstrated.

In this Book

  • Introduction
  • 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
  • Simplify Using get, set, fieldnames, and struct
  • Drawing a Shape
  • 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
  • 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
SHOW MORE
FREE ACCESS