This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

meta.class.fromName

Return meta.class object associated with named class

Syntax

mcls = meta.class.fromName(ClassName)

Description

mcls = meta.class.fromName(ClassName) is a static method that returns the meta.class object for the specified class. ClassName can be a character vector or a string scalar.

You can also use the ? operator to obtain the meta.class object for a class name:

mcls = ?ClassName;

The equivalent call to meta.class.fromName is:

mcls = meta.class.fromName('ClassName');

Use meta.class.fromName when using a character vector or string variable for the class name:

function mcls = getMetaClass(clname) 
   % Do error checking
   mcls = meta.class.fromName(clname);
   ...
end

See Also

|