parenAssign
Class: matlab.mixin.indexing.RedefinesParen
Namespace: matlab.mixin.indexing
Customize handling of object index assignments that begin with parentheses
Since R2021b
Syntax
updatedObj = parenAssign(obj,indexOp,varargin)
Description
handles index assignment operations that begin with parentheses, such as updatedObj = parenAssign(obj,indexOp,varargin)obj(idx) =
B or obj(idx).prop{1} = B. 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
Output Arguments
Examples
For a fully annotated example of a mapping class that implements custom parentheses indexing, see Customize Parentheses Indexing for Mapping Class.
Extended Capabilities
Version History
Introduced in R2021b