Main Content

parenReference

Class: matlab.mixin.indexing.RedefinesParen
Namespace: matlab.mixin.indexing

Customize handling of object index references that begin with parentheses

Since R2021b

Syntax

varargout = parenReference(obj,indexOp)

Description

varargout = parenReference(obj,indexOp) handles index referencing operations that begin with parentheses, such as obj(idx) or obj(idx).prop{1}. The method returns the indexed values from obj. The indexOp object contains the indices being referenced.

Input Arguments

expand all

Object that implements customized parentheses indexing by inheriting from matlab.mixin.indexing.RedefinesParen.

Types of indexing operations and indices referenced, specified as an array of IndexingOperation objects. For a parentheses reference, the first object in the array has a Type property of Paren.

Output Arguments

expand all

The indexed values returned from the reference operation, specified as a cell array.

Attributes

Accessprotected
Abstracttrue

To learn about attributes of methods, see Method Attributes.

Examples

For a general framework that shows how to implement customized parentheses indexing, see matlab.mixin.indexing.RedefinesParen. For a runnable example of a mapping class that implements custom parentheses indexing, see Customize Parentheses Indexing for Mapping Class.

Extended Capabilities

Thread-Based Environment
Run code in the background using MATLAB® backgroundPool or accelerate code with Parallel Computing Toolbox™ ThreadPool.

Version History

Introduced in R2021b