© Michael Paluszek and Stephanie Thomas 2020
M. Paluszek, S. ThomasMATLAB Recipeshttps://doi.org/10.1007/978-1-4842-6124-8_6

6. Classes

Michael Paluszek1   and Stephanie Thomas2
(1)
Princeton, NJ, USA
(2)
Princeton Junction, NJ, USA
 

MATLAB provides a framework for object-oriented programming. MATLAB created a new framework in 2008a, although the old one is still available. The new framework will be familiar to those of you who program in Python and C++.

Basically, objects contain both data and the operations that work on the data in one package. Classes conceptually derive from the struct which only contains data. Combining data with the code that operates on the data can lead to more reliable software. Once you create a class, you can create new classes ...

Get MATLAB Recipes: A Problem-Solution Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.