Diving into OOP with MATLAB

Mastering Programming with MATLAB: (15) Introduction to Object Oriented Programming

Estimated read time: 1:20

    Learn to use AI like a Pro

    Get the latest AI workflows to boost your productivity and business performance, delivered weekly by expert consultants. Enjoy step-by-step guides, weekly Q&A sessions, and full access to our AI workflow archive.

    Canva Logo
    Claude AI Logo
    Google Gemini Logo
    HeyGen Logo
    Hugging Face Logo
    Microsoft Logo
    OpenAI Logo
    Zapier Logo
    Canva Logo
    Claude AI Logo
    Google Gemini Logo
    HeyGen Logo
    Hugging Face Logo
    Microsoft Logo
    OpenAI Logo
    Zapier Logo

    Summary

    In this enlightening session on object-oriented programming (OOP) using MATLAB, Jalal YzY takes us from the basics of procedural programming to the sophisticated world of OOP. The lesson begins by highlighting the limitations of procedural programming in handling large, complex programs and introduces OOP as a solution. Jalal discusses the concept of objects and classes, emphasizing data-centered programming. Through clear examples and analogies, he illustrates how to define classes and create objects in MATLAB. The session also explores constructors, access methods, and the power of inheritance in creating subclasses. By the end, learners grasp the essence of OOP and its advantages in managing data and functions efficiently within MATLAB.

      Highlights

      • Traditional procedural programming struggles with large, complex programs, making OOP essential. 🀯
      • OOP centers around 'objects', which bundle data and functions, streamlining code management. πŸ“¦
      • Understanding 'classes' and 'objects' is crucial, with each class serving as a blueprint for objects. πŸ‘©β€πŸ«
      • MATLAB's class system requires defining classes in M-files named after the class, a structure lesson clarity. πŸ“‚
      • Constructors and access methods within classes offer powerful tools for initializing and protecting data. πŸ› οΈ

      Key Takeaways

      • OOP shifts the focus from functions to data, organizing the latter in objects. πŸ“Š
      • Classes in MATLAB define objects and are user-defined, enhancing flexibility. πŸ—οΈ
      • Constructors automate object creation and initialization for efficient coding. πŸš€
      • Access methods safeguard data integrity by controlling modifications. πŸ”
      • Inheritance allows new classes to build on existing ones, fostering efficient code reuse. πŸ”„

      Overview

      From the onset, Jalal YzY emphasizes the transition from procedural to object-oriented programming (OOP) in MATLAB, which is necessary for managing more complex coding tasks. Procedural programming, though structured with functions, falters as complexity increases, thus necessitating the adoption of OOP principles.

        The core of this lecture lies in understanding how OOP redefines programming by centering on 'objects'β€”data structures that include both data and functions. MATLAB users learn to define their own classes, which serve as templates for creating objects, a vital shift from rigid procedural scripts to versatile and manageable code entities.

          The lesson delves into the intricacies of creating constructors for initializing objects and access methods for data integrity, highlighting MATLAB's distinct approach. Also, the concept of class inheritance is explored, showing how new classes can extend existing onesβ€”making code reuse not only possible but efficient, encapsulating MATLAB's robust capacity for sophisticated programming.

            Chapters

            • 00:00 - 01:00: Introduction to Object-Oriented Programming The chapter provides an introduction to Object-Oriented Programming (OOP), contrasting it with procedural programming. It highlights how previous lessons focused on organizing code into functions, mostly through a main function and auxiliary helper functions to execute tasks and return results.
            • 01:00 - 05:00: Basics of Object-Oriented Programming The chapter discusses the limitations of passing around programs as function arguments and storing them in variables, especially in larger and more complex programs. In small-scale programs, this method works adequately, but it does not scale well for bigger projects. The introduction to object-oriented programming suggests that it offers a better approach to handle complexity in programming.
            • 05:00 - 10:30: Defining and Using Classes in MATLAB The chapter discusses the limitations of procedural programming as the size and complexity of programs grow, particularly in managing data. It highlights the challenges of tracking and maintaining data integrity in large-scale programs, which can consist of millions of lines of code. The text emphasizes the difficulties posed by relying solely on local and global variables, as well as function arguments for data management, hinting at the need for more advanced programming paradigms, such as object-oriented programming, to address these issues efficiently.
            • 10:30 - 23:00: Inheritance and Subclasses Object-oriented programming (OOP) addresses common issues in modifying and understanding existing code that processes data by introducing organized structures for code. This chapter introduces OOP and sets expectations for learning it, explaining that while it is typically taught as a long course in college or covered in depth by extensive literature, the chapter will provide a concise overview in a single lesson.
            • 30:00 - 36:30: Conclusion The chapter introduces basic concepts and demonstrates their application in MATLAB. It aims to spark interest in the topic, encouraging exploration of further resources. The focus is on Object-Oriented Programming (OOP), which differs from Procedural Programming by prioritizing data rather than functions. In OOP, data is encapsulated within entities known as objects, which differs from the general use of the term 'object' in everyday language.

            Mastering Programming with MATLAB: (15) Introduction to Object Oriented Programming Transcription

            • 00:00 - 00:30 [Music] what we've learned in the first course and so far in this one falls within the category of procedural programming we've organized our code into functions typically creating a main function that utilizes helper functions to compute whatever it needs and then returns the results to the command window the data that our
            • 00:30 - 01:00 programs have worked on have been passed around as function arguments and have been stored in local variables and in a few rare cases in global ones this approach has worked just fine for us mainly because the programs and exercises in this course are all necessarily small and relatively easy to comprehend what happens if we have to write large complex programs does this approach scale well the answer is sadly no
            • 01:00 - 01:30 procedural programming focuses on the operations that a program needs to carry out but as the size and complexity of the program grows it becomes more and more difficult to manage the data that the program works on modern computer programs today consist of many tens of thousands or even millions of lines of code having only local and global variables and function arguments at our disposal makes it harder to keep track of the data harder to make sure that we don't make unintended changes to the data and
            • 01:30 - 02:00 harder to understand and modify existing programs that process the data object-oriented programming commonly abbreviated as oop was invented to help with all these problems and we're going to look at object oriented programming in this lesson before we dig in though we need to set your expectations object oriented programming is typically taught as a semester-long course in college also there are many long books on the topic what we can do here in a single lesson
            • 02:00 - 02:30 is introduce the basic concepts and show you how they work in matlab if we manage to pique your interest in the topic you'll want to turn to additional resources after this lesson object-oriented programming unlike procedural programming is centered on data as opposed to functions and in the object-oriented world data are stored inside something called an object of course in everyday speech the word object can refer to almost anything from
            • 02:30 - 03:00 an apple to a zebra but you can probably guess from its name object-oriented programming gives the word object to very special meaning that meaning will not be completely clear until you've seen some examples but one thing that'll help you get started is to think of an object as a struct with some extra features we explained the struct in the seventh lesson of our introductory course but just to refresh your memory here's an example
            • 03:00 - 03:30 here by using the struct function i've given the variable very cool guy the field name and the empty array as its value i didn't use a semicolon to suppress the output so matlab echoes the contents of very cool guy showing its single field and the field's value since we're using a version of matlab released after 2015 we also get this message telling us that it's a struct
            • 03:30 - 04:00 never thought about this before but since there's only one field it seems a little awkward that matlab says fields here maybe i'll drop a note in the suggestion box well now let's name this very cool guy this time instead of using the struct function i've used the dot operator to access the field and i've assigned the string mike
            • 04:00 - 04:30 fitzpatrick to it now let's add a second field and there it is as in mike fitzpatrick is my name professor is my game oh that's a very cool guy but what about that blank space after struck with fields do we really need that i wonder where that suggestion box is anyway
            • 04:30 - 05:00 well the reason that i said an object is like a struct is that an object also includes one or more fields and as a matter of fact the data that an object contains is stored in those fields and you can assign values to those fields using the dot operator so there are definitely similarities but i also said that an object has extra features so what are those well for openers in addition to data an
            • 05:00 - 05:30 object can contain functions for operating on its data so functions stored with data okay well i told you you've got to see some examples to understand objects and we'll show you lots of examples but before we do that we need to nail down some object oriented terminology first off an object is stored in a variable just like that struct we just saw was stored in the variable named
            • 05:30 - 06:00 very cool guy and like any other variable it has a type but unlike the variables that we've worked with up to now whose types are built into the matlab language like doubles cells string structs and so forth the type of an object must be defined by the user and in a typical object-oriented programming application many different types are defined and to distinguish them from built-in types user-defined types are called classes
            • 06:00 - 06:30 and to define a class we use a new keyword named class def c-l-a-s-s-d-e-f so without further ado let's write our first class definition if you're starting from scratch you can click the new icon and select class you'll get a template to work with but for a newbie it's kind of complicated and we want to start simple
            • 06:30 - 07:00 to do that let's open this m-file that we've prepared for you named contact underscore v1 before we talk about it i'm going to save it with a simpler name contact m there and i'll close contact underscore v1 the v1 means version one of our examples and you can see that we have quite a few
            • 07:00 - 07:30 versions to show you now we can talk about it we're looking at a definition of a class for storing people's contact information and to keep it simple it includes only first names last names and phone numbers as you can see a class definition starts out with that keyword class def and it's followed by the name of the class that we want to define which in this case is contact
            • 07:30 - 08:00 and we followed the object-oriented convention of starting the name of the class that we're defining with an uppercase letter the reason that i quickly saved this file with the name contact is that a class definition is legal only if it's defined in an m-file and only if that m-file has the same name as the class inside our contact class we've added three properties after the keyword
            • 08:00 - 08:30 properties each property is a data field just like the fields in a struct and here again we've started the property names with uppercase letters and we've used uppercase letters inside the names to highlight where new words begin this capitalization approach is a good habit to get into and we'll continue doing that throughout this lecture and we added a couple of n keywords at the proper places to mark the endpoints
            • 08:30 - 09:00 of the list of properties and of the class definition itself okay you've seen how easy it is to create a class you just use class def with the class name to write its definition in an m-file and then save the m-file with the name of the class now i bet you'd like to see how to create an object of this class well that's even easier at first it might seem that this command
            • 09:00 - 09:30 just assigns a copy of the class named contact to a variable named person but that is not what this command does in fact it's not even possible to assign a class to a variable instead this command creates an object of the class contact and assigns that object to the variable person and during the creation of that object matlab assigned a value to each one of
            • 09:30 - 10:00 the object's properties and the value it chose was the empty array why did it assign the empty array to the properties even though the user has put nothing in there yet well it did that because every property of every object must have a value at all times and nothing says there's nothing here like an empty array of course empty arrays are not the best values for names and phone numbers
            • 10:00 - 10:30 so we need to get busy assigning them the values that we want them to have and we can do that in just the same way that we assign values to fields of the struct very cool guy let's rearrange the desktop and then start with the first property and let's repeat this approach for the other two properties well issuing multiple commands to create
            • 10:30 - 11:00 an object and then assign values to each of its properties certainly works but it's cumbersome especially if we have a lot of properties and need to set them for a lot of objects well we can get this work done with just one command that creates an object and gives values to its properties if we introduce a couple more features the first feature is something we've already alluded to and that is that we can add functions to an object
            • 11:00 - 11:30 we do it by putting function definitions inside the definition of the object's class those function definitions appear in a new section of the class which is introduced by the keyword methods the word methods is used because in matlab a function defined inside a class is called a method a name is not unique to matlab in fact it's older than matlab itself the name method was the name first used for functions defined in a class way
            • 11:30 - 12:00 back in the 1960s when object-oriented programming was introduced in a programming language named simula in more recent languages like c plus and java a class function is called a member function but you're safe with either terminology when people talk about object-oriented programming they're as likely to use method as member function as our first example of a method we're
            • 12:00 - 12:30 going to introduce another feature of object-oriented programming the constructor a constructor is exactly what we need to avoid the cumbersome approach of adding values one by one to the properties of an object after we create it a constructor is a method that creates an object and gives values to its properties at the same time let's add a constructor to our contact class
            • 12:30 - 13:00 as promised we've introduced the methods section with the keyword methods to define a function in the methods section we start as usual with the function keyword and conclude with the keyword end
            • 13:00 - 13:30 the function signature has the usual form argument list equals sign function name and formal input arguments in parentheses so far we've defined only one method for this class and its name is the same as the name of the class contact usually a method does not have the same name as its class but this function is a constructor and a constructor must have the same name as the class it's defined in
            • 13:30 - 14:00 the output of a constructor is the new object that it creates and in the body of the constructor it builds that object and assigns it to its formal output argument which we've named obj this constructor has three formal input arguments l name f name and phone but there is no restriction on the number of formal arguments and it can in fact use the argument varer again so it can be called with any number of
            • 14:00 - 14:30 actual arguments in that sense it's just like an ordinary function but the possibility of having varying numbers of actual arguments is especially important for constructors because unlike most object-oriented programming languages in matlab a class can have only a single constructor notice how we access a property of the object it's no different from a struct we use the dot operator the first
            • 14:30 - 15:00 operand is the variable that holds the object which in this case is obj and the second operand is the property name matlab does not allow you to use a property name by itself that's also consistent with the way a struct works but most other object-oriented languages do allow it and those languages also provide a keyword to access the current object while matlab does not if you've programmed in another
            • 15:00 - 15:30 object-oriented language you know what i'm talking about and you'll just have to get used to this different approach it's not a big deal but if not then you don't have to break any habits well let's create a new object with our shiny new constructor it's really nice that we can create and properly initialize a new object with a single call to the class constructor method if we look at the constructor code again
            • 15:30 - 16:00 an added benefit is that we can also control the data types of the properties in the constructor as you can see we make sure that each property of the contact class is a string note how we use a double for the phone number when we call the constructor but the property itself becomes a string because we make sure of that in the constructor method still at this point this is not much different from a struct so what's the big deal about classes and
            • 16:00 - 16:30 object-oriented programming well let's consider a problem with our current class if i wanted to modify a property i could do it without restrictions and i could mess up the object a number for a last name doesn't make sense and even worse it can break other parts of our program later since we assume it was a string you may say of course that i would not
            • 16:30 - 17:00 make a mistake of assigning a number for last name but just imagine if you're writing a large program with tens of thousands of lines of code maybe hundreds of classes and thousands of instances some of the classes you didn't even write other team members might have implemented them or maybe you're using freely available software libraries are you sure that you're going to remember every
            • 17:00 - 17:30 assumption about every property of every class in that case not likely so it's much better to design classes for which users of the class cannot violate the assumptions that's actually one of the reasons object-oriented programming was invented so in our simple case how can we prevent somebody from accidentally changing the last name to a number well we add a special kind of method to the object called an access method if we do
            • 17:30 - 18:00 that then when someone tries to access the property for which we've created this access method matlab will silently call our method instead of letting the caller have direct access let's write our first access method this is a set access method for the last name property also known as a property set method the syntax is a bit unusual
            • 18:00 - 18:30 the method name must be set dot property name the first input argument must be the object itself and it must be the output argument as well the second input argument is the new value that we're going to assign to the property as far as our implementation is concerned we do what we did in the constructor we set the last name property to the new value making sure that it's a string
            • 18:30 - 19:00 let's try it i tricked you you're not allowed to use an access method directly the whole point is that when someone tries to assign a new value to the property by using the dot operator matlab will check to see whether there is a set access method for this property and this access function will get called automatically
            • 19:00 - 19:30 well we change the last name how do we know that our set access method was called let's try to assign pi as the last name again it might not be obvious at first but our access method did its job the last name property is not pi it's the string 3.1416 which is what the string function
            • 19:30 - 20:00 produces when you give it the argument pi of course we could go further with our access method and have it checked to determine whether someone tries to assign a number to the last name property and send an error back if they do but for our simple case we'll just leave it as it is now i want to show you a pitfall so you can avoid falling into it let's make a simple mistake in our access method
            • 20:00 - 20:30 i used an underscore as opposed to a period in the name of the method let's see what happens if i try to use it yep we're back to having a number for a last name the point is this when you create an access method you need to make sure that it is indeed working and being called one way is to set a breakpoint inside so let's set our method back to the way
            • 20:30 - 21:00 it's supposed to be and put a break point in it and see what happens as you can see we are indeed inside the access method okay let's add access methods to the rest of the properties so here's the latest version of the class
            • 21:00 - 21:30 we can also provide get access methods to our properties which are also known as property get methods while for our simple contact class this is not really necessary here's the syntax to show how we would do it the method name is get dot property name a single input argument is the object and the single output argument contains
            • 21:30 - 22:00 the value of the property that we're returning get access methods are called whenever we query the value of a property for example but how do we check to see whether this get access method is actually being called well we can use a break point again or we can temporarily modify the method say like this
            • 22:00 - 22:30 and you can see that it worked while set access methods are frequently used get access methods not so much we won't use them for our contact class either so where are we we have a nice contact class that allows us to create objects as instances of it these contact objects each have
            • 22:30 - 23:00 properties for storing the first and last names of persons as well as their phone numbers but what if we wanted to store not just personal contact information but business information too our existing contact class wouldn't work for that because every business contact needs a property to hold the company name and the contact class doesn't have one we could add a company name property of course
            • 23:00 - 23:30 but it wouldn't get used for personal contacts so we'd have a wasted slot sitting there empty for all of them and it's not ideal for another reason too we might want slightly different behavior for personal contacts from business contacts so what do we do well another option would be to create a brand new business contact class by copying the contact class adding a property to the copy
            • 23:30 - 24:00 and renaming it but there's a disadvantage to that too because if we make some improvements to the way the contact class handles its names and the phone number then to get those changes into the business contact class we'd have to copy them into it this situation is not so likely with our simple contact class but it happens a lot with more complex classes wouldn't it be wonderful if we were able to create a new business
            • 24:00 - 24:30 contact class that incorporates properties of the existing contact class that are relevant to its purposes without any copying are you kidding it's a piece of cake walk in the park day at the beach because one of the most important features of object oriented programming is that one class can build on another class and that feature even has a name it's called inheritance
            • 24:30 - 25:00 we can create a new class and specify that it is indeed a new modified or derived version of another class such a class is called a subclass and it inherits all the properties and methods of its superclass which somewhat confusingly is also called a base class it can modify methods that it inherits and it can add its own properties and methods as well but what are we waiting for
            • 25:00 - 25:30 let's create a new business contact class from the existing contact class as you can see all we had to do is use the less than character followed by the name of the existing class then we simply added two new properties company for the company name and fax for the fax number yeah i know fax machines are dinosaurs
            • 25:30 - 26:00 but believe it or not many companies still have them well that was easy now let's create our first business class instance clean up on aisle nine let's see what we've got here okay that's the constructor of the contact class it's expecting inputs and we didn't give any wait a minute before we solve that problem how did we get to the constructor of the
            • 26:00 - 26:30 contact class when we were constructing a business contact object well a business contact is a subclass of the superclass contact and whenever matlab creates an instance of a subclass it needs to create an instance of the superclass first remember the subclass gets all the properties of the superclass and the way that happens is that the superclass object becomes kind of a part of the subclass object
            • 26:30 - 27:00 and when you try to create a subclass instance matlab first calls the superclass constructor which in this case is contact and that contact constructor has three input arguments so we had better supply them or get ready to face a sea of red but just like with the contact class it would be better if we had a constructor that also initialized the company name and the fax number at once
            • 27:00 - 27:30 let's do that and let's test it we just cannot seem to keep aisle 9 clean what's the problem now well we just discussed that the superclass constructor will be called by matlab but it expects three input arguments in this case we've not told matlab what arguments it should use so it uses none
            • 27:30 - 28:00 but our contact class constructor is not prepared to be called with zero arguments there are two solutions first we should prepare the contact constructor to be called with zero input arguments that's actually a good practice independent of this particular issue at hand so let's go back and modify the contact constructor in fact let's make it able to accept any number of arguments from 0 to 3.
            • 28:00 - 28:30 and let's test it and let's see whether we fixed our business contact constructor issue well that did it by the way these aren't really bill gates phone numbers um i'm pretty sure bill and i have an understanding that he doesn't give out
            • 28:30 - 29:00 my phone numbers and i don't give out his the only reason he needs to have my phone number is because he you know might need to call me up every once in a while to get computer advice and i'm happy to give it so what did matlab do exactly here we called the business contact constructor with five arguments the first thing matlab did was call the contact constructor with zero arguments then we set all the properties of the new business class its own as well as
            • 29:00 - 29:30 the ones it inherited from contact one by one i mentioned that there were two solutions to the problem we were having with creating a new business contact instance what's the second solution well instead of relying on matlab to call the superclass constructor why don't we call it ourselves in that case we can call it the way we want to for example instead of manually setting the last name and other inherited
            • 29:30 - 30:00 properties we can simply call the superclass constructor that already does that anyway here we go the syntax is a bit unusual as you can see you have to use the at sign operator with the output object and the superclass name to call the superclass constructor then you can supply whatever arguments you want the most important rule as far as calling the superclass constructor is
            • 30:00 - 30:30 concerned is that it must be called before the object variable is used for anything else two final improvements to the business class await just as we did for the contact constructor we should prepare the business contact constructor to be able to accept any number of arguments up to five let's do that
            • 30:30 - 31:00 and our final tweak to the business contact class is to add set access methods for the new properties well that's the final tweak to the business contact class but now dad blasted i've thought of a tweak that i should have made to the contact class and i should have thought of it before i defined the business contact class tad blasted
            • 31:00 - 31:30 what i should have done is add a method for printing the name of the contact in the command window and the business contact class could have inherited the dad blasted thing well better late than never i'll go ahead and add it now there it is and by the way this is what most ordinary methods look like by ordinary i mean that it's not a constructor which creates a new object and has to have the same name as the
            • 31:30 - 32:00 class of the object and it's not an access method which accesses a property of the object that it's acting on and whose name has to have a dot in it for ordinary methods there's no restrictions on the name its first argument automatically gets a copy of the object that it's acting on and the body of the function is free to access any of the object's properties using the dot operator here we've got just one argument and since it's the first one it'll get the
            • 32:00 - 32:30 copy of the object that the method's acting on and we've used the dot operator to access two properties first name and last name and we print with fprintf just as we would with any normal non-method function and you can call it with the dot operator using operands that are the name of the variable holding the contact object that you want it to act on and the name of the method like this
            • 32:30 - 33:00 how would you look at that even though i created the object in the variable name person way before i added the print name method to the contact class is working just fine this tells you that you can modify a class anytime you want to and the modifications will ripple out to all its objects old or new let's try it with person two who was that anyway
            • 33:00 - 33:30 oh yeah that guy what about that business contact object that we created which we stored in the variable b it's an instance of the subclass of contact how about that the ripples keep spreading not only to the objects of the class we changed but to the objects of the subclass so inheritance works no matter whether
            • 33:30 - 34:00 we declare a subclass before or after the change to the superclass do you see the significance of this ripple effect the object stored in the variable b is an instance of the business contact class which we did not change but since it's a subclass of the superclass contact which we did change the object in b inherits the new method as well as everything else it got when we created it it's like a child inheriting an estate
            • 34:00 - 34:30 from a parent if the estate grows the child gets richer so see if bill gates were my child and inherited my estate and then my investments increased in value then he would gain hundreds of thousands of dollars more and you can imagine what that would mean um you know what never mind maybe that's not a great analogy let's just say that when you change a class
            • 34:30 - 35:00 that change flows out to every object of the class and every object of every subclass for which it served as a superclass this is a major advantage of inheritance because it maintains consistency without the need to pour through thousands of lines of code looking for places where changes need to be made by hand and it's another great thing about object-oriented programming and with the introduction of this great thing we'll conclude our first lecture on object-oriented programming
            • 35:00 - 35:30 and during this lecture we learned that object-oriented programming is data centered we learned that the data is contained in a new entity called an object and that the type of an object is called a class and must be defined by the user we learned how to define those classes with the class def keyword and we learned that a class keeps its data in a section of the class headed by the keyword properties inside that section property names are
            • 35:30 - 36:00 listed and those properties behave very similarly to the fields of structs as for example being accessed via the dot operator a most surprising and most important thing that we learned is that in addition to data stored in the fields defined inside the properties section a class can contain functions defined inside a method section we learned that those functions are accessible to objects of that class and of its subclasses
            • 36:00 - 36:30 and we learned how to define a subclass in terms of another class which is called its superclass perhaps the most important feature of object-oriented programming that we learned about is inheritance which is the ability of a subclass to receive properties and methods from its superclass including those added to the superclass after the subclass has been defined finally we learned how to create three special kinds of methods the constructor
            • 36:30 - 37:00 which assists in the creation of new objects the set access method which assists in setting values of properties of objects and the get access method which assists in the retrieving of the values of the properties of objects so we clearly learned a lot in this one lecture but as i mentioned in the introduction we are still only scratching the surface here there are many rules that control inheritance constructors and access
            • 37:00 - 37:30 methods that we didn't cover if you want to know more check out the extensive matlab documentation on these issues for example if you google matlab constructors the first link takes you to this page as you can see it's quite detailed and it explains all the rules that govern constructor behavior in matlab why did i choose this rating
            • 37:30 - 38:00 well it's probably because i like matlab you're welcome [Music]