class
Return classname of object or creates a named object.
Syntax
name = class(var)
obj = class(st, strname)
Input argument
var - a variable
st - a struct
strname - a string: classname desired
Output argument
name - a string
obj - an object of type 'strname' based on struct 'st'
Description
name = class(var) returns the class of var variable.
Standard classes are:
'cell'
'struct'
'single'
'double'
'logical'
'char'
'int8'
'int16'
'int32'
'int64'
'uint8'
'uint16'
'uint32'
'uint64'
'function_handle'
Examples
See also
isa, isdouble, isfloat, ischar, isstruct, iscell.
History
Version | Description |
---|---|
1.0.0 | initial version |
Author
Allan CORNET
Last updated