A Guide to MATLAB Object-Oriented Programming

Part 3: Advanced Strategies

CHAPTER LIST

Chapter 19: Composition and a Simple Container Class
Chapter 20: Static Member Data and Singleton Objects
Chapter 21: Pass-by-Reference Emulation
Chapter 22: Dot Functions and Functors
Chapter 23: Protected Member Variables and Functions
Chapter 24: Potpourri for $100

PART OVERVIEW

In this section, we redeploy standard object-oriented techniques in a way that allows MATLAB to create a few special-purpose classes commonly found in other object-oriented languages. These include containers, singleton objects, functors, and iterators. These classes require strong encapsulation and a flexible object-oriented language. The fact that these sophisticated classes can be created from elements that already exist pays tribute to the MATLAB design team. If these example classes make you wonder what else is possible, they have done their job. With a little imagination and creativity, anything is possible.

Some of the topics in this section are controversial because they upset the status quo. Redefining member-function syntax, adding a pass-by-reference function model, and obtaining protected visibility for variables and functions are probably the most disruptive topics. The discussions don t try to judge whether you should adopt a particular technique, but instead try to demonstrate the flexibility inherent in MATLAB objects and expand the way you think about them. Some of the techniques are worthy of adoption, while others would benefit from more support from the language and the user community. Like many disruptive technologies, it is hard to know in advance what will be embraced. Unlike many languages, MATLAB s evolution...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Programming Languages
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.