Chapter 13
Designing and Using Classes
IN THIS CHAPTER
Defining Object Oriented Programming (OOP) principles
Considering MATLAB OOP differences
Creating a class
Using OOP in MATLAB
Objects are things that everyone uses every day. You grab a doorknob and turn it to open a door. Both the doorknob and the door are objects. Each has its own characteristics, and you wouldn’t confuse a doorknob for a door. The doorknob turns; the door opens. Each object has its own behaviors. In short, the use of objects is intuitive.
MATLAB supports the use of objects in the form of Object-Oriented Programming (OOP). OOP may sound complex, but like the doorknob and the door, using objects in MATLAB is actually quite intuitive, as described in the first part of the chapter.
Many programming languages support OOP, but they each have nuances. If you have used OOP with another language, you will find that working with OOP in MATLAB makes use of that knowledge. The second part of the chapter looks at differences between MATLAB OOP support and that provided in some common languages. You also discover how to ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access