matlab.indexing.IndexingOperation - Type of customized indexing operation and referenced indices - MATLAB (original) (raw)
Main Content
Namespace: matlab.indexing
Type of customized indexing operation and referenced indices
Since R2021b
Description
Creation
MATLAB creates instances of IndexingOperation
as needed. The property values are set at creation.
Properties
Type of indexing operation, identified as an IndexingOperationType
enumeration member:
Brace
Dot
Paren
ParenDelete
Attributes:
GetAccess | public |
---|---|
SetAccess | immutable |
List of indices referenced in indexing operation, specified as a cell array. When the Type
property is Dot
, accessing this property results in an error.
Attributes:
GetAccess | public |
---|---|
SetAccess | immutable |
Name of the field referenced in a dot indexing operation, specified as a string. When the Type
property has any value except forDot
, accessing this property results in an error.
Attributes:
GetAccess | public |
---|---|
SetAccess | immutable |
Examples
Sample Property Values
This table shows examples of customized indexing calls and the type ofIndexingOperation
instances that MATLAB creates. Expressions with more than one indexing operation generate arrays ofIndexingOperation
instances.
Indexing Expression | IndexingOperation Instances |
---|---|
obj(1,[2,3]) = 4 | Type:IndexingOperationType.ParenIndices:{1,[2,3]} |
obj.PrivateProp{1} | Instance 1:Type:IndexingOperationType.DotName:"PrivateProp"Instance 2:Type:IndexingOperationType.BraceIndices:{1} |
obj(true,:) = [] | Type:IndexingOperationType.ParenDeleteIndices:{1,':'} |
Version History
Introduced in R2021b