| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
mc = metaclass(object)
mc = ?classname
mc = metaclass(object) returns the meta.class object for the class of object. The object input argument can be a scalar or an array of objects. However, metaclass always returns a scalar meta.class object.
mc = ?classname returns the meta.class object for the class with name classname. The ? operator works only with a class name, not an object.
If you pass a class name as a string to the metaclass function, it returns the meta.class object for the char class. Use the ? operator or the meta.class.fromName method to obtain the meta.class object from a class name.
Return the meta.class object for an instance of the MException class:
obj = MException('Msg:ID','MsgTxt');
mc = metaclass(obj);Use the ? operator to get the meta.class object for the hgsetget class:
mc = ?hgsetget;
meta.class | meta.class.fromName
![]() | meta.property | methods | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |