| MATLAB Function Reference | Search  Help Desk |
| class | See Also |
Create object or return class of object
Syntax
str = class(object) obj = class(s,'class_name') obj = class(s,'class_name',parent1,parent2...)
Description
str = class(object)
returns a string specifying the class of object.
The possible object classes are:obj = class(s,'class_name')
creates an object of class 'class_name' using structure s as a template. This syntax is only valid in a function named class_name.m in a directory named @class_name (where 'class_name' is the same as the string passed into class).
NOTE
#class_name.
obj = class(s,'class_name',parent1,parent2,...)
creates an object of class 'class_name' using structure s as a template, and also ensures that the newly created object inherits the methods and fields of the parent objects parent1, parent2, and so on.
See Also
inferiorto, isa, superiorto
Limitations
clear doesn't affect the amount of memory allocated to the MATLAB process under UNIX.