class - Class of object - MATLAB (original) (raw)
Main Content
Syntax
Description
[className](#mw%5F661b176d-8919-428f-9047-273f4208e51d) = class([obj](#mw%5F6f09edb1-fdf2-4328-8d55-1607d809b97d))
returns the name of the class of obj
.
Examples
Get the class name of a Java® object.
jObject = java.lang.String('Java string'); className = class(jObject); disp(className)
Determine the class of a variable.
h = @sin; className = class(h); disp(className)
Input Arguments
Object or literal, specified as a variable or an expression.
Example: class(date)
Output Arguments
Name of the class, returned as a character vector.
Extended Capabilities
Version History
Introduced before R2006a