parenListLength
Class: matlab.mixin.indexing.RedefinesParen
Namespace: matlab.mixin.indexing
Determine number of values to return from customized indexing operations beginning with parentheses
Since R2021b
Syntax
n = parenListLength(obj,indexOp,indexContext)
Description
determines the number of values to return from customized indexing operations that reference
or assign to comma-separated lists. Operations that begin with parentheses indexing and end
with dot or brace indexing produce comma-separated lists, such as n
= parenListLength(obj
,indexOp
,indexContext
)[C{:}] =
obj(idx).prop
and [obj(idx).prop{:}] = B{:}
. The
IndexingOperation
object contains the indices being changed, and
indexContext
identifies whether the reference is used in a statement, as
a list of arguments to a function, or in an assignment operation.
Input Arguments
Output Arguments
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.
Version History
Introduced in R2021b