MATLAB: Can I query the properties of a custom class using the ‘get’ method

classcustomMATLAB

Can I query the properties of a custom class using the 'get' method?

Best Answer

To use the 'get' and 'set' methods for custom classes, you will first have to derive handle classes with set and get methods. 
You can use the 'SetGet' mix-in to add 'get' and 'set' to a class. Once the 'get' and 'set' methods are added to the class, you can obtain the list of properties using the 'get' method:
>> h = myClass;
>> get(h)
More information regarding the mix-in is available at: