matlab.mixin.indexing.RedefinesBrace.braceAssign - Customize handling of object index assignments that begin with braces - MATLAB (original) (raw)
Main Content
Class: matlab.mixin.indexing.RedefinesBrace
Namespace: matlab.mixin.indexing
Customize handling of object index assignments that begin with braces
Since R2021b
Syntax
updatedObj = braceAssign(obj,indexOp,varargin)
Description
[updatedObj](#mw%5Feac6a0cd-63f4-431e-a076-00ffeb8c0a3d) = braceAssign([obj](#mw%5F92598b56-7f7e-4f12-a7f1-db3df9e04b36),[indexOp](#mw%5F009a0f4b-160a-49e5-80d0-bd24ba0a934d),[varargin](#mw%5F240f1d50-51c5-478a-bcb9-c2101c455b85))
handles index assignment operations that begin with braces, such as obj{4} = 3
or obj{1}.prop{2} = 4
. The indexOp
object contains the indices of the values being changed, and varargin
is a cell array of values to be assigned to those indexed locations. The method returns the updated object.
Input Arguments
Object that implements customized brace indexing by inheriting from matlab.mixin.indexing.RedefinesBrace
.
Types of indexing operation and indices referenced, specified as an array ofIndexingOperation
objects. For a brace assignment, the first object in the array has a Type
property of Brace
.
Values to be assigned in the indexing operation, specified as a cell array. For example, in the assignment operation obj{1} = B
, the valueB
is the only element in this argument.
Output Arguments
Updated object after assignment operation.
Attributes
Access | protected |
---|---|
Abstract | true |
To learn about attributes of methods, seeMethod Attributes.
Examples
For an example of a class that implements custom brace indexing, see matlab.mixin.indexing.RedefinesBrace.
Version History
Introduced in R2021b