B = subsref(A, S)
| Parameter | Description |
|---|---|
| A | Indexed object array |
| B | Indexing structure |
| Parameter | Description |
|---|---|
| B | Result of indexing expression |
B = subsref(A, S) is invoked when using the syntax A(i), A{i}, or A.i with an object A.
A = magic(5);
S.type='()';
S.subs={1:2,':'};
R = subsref(A, S)
C = {"one", 2, 'three'};
S = [];
S.type = '{}';
S.subs = {[1 2]};
[R1, R2] = subsref(C, S);
A = struct('number', 10);
S = [];
S.type = '.';
S.subs = 'number';
R = subsref(A, S)
| Version | Description |
|---|---|
| 1.0.0 | initial version |