MATLAB Object-Oriented Programming
When you access a property, MATLAB executes any property set or get access method and triggering any enabled property events. In ...
“Property Definition” on page 8-17 “Property Attributes” on page 8-9 8 Properties — Storing Class Data ...
Property Attributes In this section... “Purpose of Property Attributes” on page 8-9 “Specifying Property Attributes” on page 8-9 ...
Property Attributes Attribute Name Class Description AbortSet logical default = false If true, MATLAB does not set the property ...
Attribute Name Class Description Access (write-only, cannot query this meta.property property. Use GetAccess and SetAccess in qu ...
Attribute Name Class Description Dependent logical default = false If false, property value is stored in object. If true, proper ...
Attribute Name Class Description GetAccess enumeration default = public public — unrestricted access protected — access from cla ...
Attribute Name Class Description Hidden logical default = false Determines if the property can be shown in a property list (e.g. ...
Attribute Name Class Description SetAccess enumeration default = public public — unrestricted access protected — access from cla ...
See Also Related Examples “Property Definition” on page 8-17 8 Properties — Storing Class Data ...
Property Definition In this section... “What You Can Define” on page 8-17 “Initialize Property Values” on page 8-18 “Property De ...
Initialize Property Values There are two basic approaches to initializing property values: In the property definition — MATLAB ...
Assign Property Values from Constructor To assign values to a property from within the class constructor, reference the object t ...
classdef ClassName properties (PropertyAttribute = value) Prop1 Prop2 end end For example, only methods in the same class defini ...
For example, the set.Password method tests the length of the character array assigned to a property named Password. If there are ...
Mutable and Immutable Properties In this section... “Set Access to Property Values” on page 8-22 “Define Immutable Property” on ...
end end a = Immute a = Immute with properties: CurrentDate: '19-Oct-2005' See Also Related Examples “Property Attributes” on pa ...
Validate Property Values In this section... “Property Validation in Class Definitions” on page 8-24 “Sample Class Using Property ...
property must conform to the specified size or be compatible with the specified size. For more information, see “Property Size V ...
constructor if size restriction does not allow the use of an empty default value. The default constructor must return an object ...
«
9
10
11
12
13
14
15
16
17
18
»
Free download pdf