| MATLAB Function Reference | Search  Help Desk |
| class | See Also |
Create object or return class of object
str = class(object) obj = class(s,'class_name') obj = class(s,'class_name',parent1,parent2...)
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.
inferiorto Inferior class relationship
isa Detect an object of a given class
superiorto Superior class relationship