Customize indexed reference and assignment behavior for object arrays. Although user-defined classes possess the same indexing behavior as built-in MATLAB® classes, you can modify this behavior when your class has special requirements.
|Number of arguments for customized indexing methods|
|Redefine subscripted reference for objects|
|Redefine subscripted assignment|
|Convert object to array index|
|Create structure argument for subsasgn or subsref|
|Execute built-in function from overloaded method|
MATLAB classes support object array indexing by default.
Learn how to modify subscripted reference.
Learn how to modify subscripted assignment.
There are code patterns useful for modifying object indexing.
Classes that modify object array indexing must handle the correct number of arguments retrurned from or passed to indexing methods.
Modify the number of arguments passed to or returned from indexing methods.