Main Content

braceReference

Class: matlab.mixin.indexing.RedefinesBrace
Package: matlab.mixin.indexing

Customize handling of object index references that begin with braces

Syntax

varargout = braceReference(obj,indexOp)

Description

varargout = braceReference(obj,indexOp) handles index referencing operations that begin with braces, such as obj{idx} or obj{idx}.(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 brace indexing by inheriting from matlab.mixin.indexing.RedefinesBrace.

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

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 an example of a class that implements custom brace indexing, see matlab.mixin.indexing.RedefinesBrace.

Introduced in R2021b