The index operator [ ] returns elements of a matrix or a vector with [n] entries.
The numbering of the indices of an array is a zero-based numbering. Means the 1st entry of an array object is returned at .
Vector Index: x[i]
The operation x[i] returns the (i + 1)-th component of the input object x. i is the number of the index of the vector
Variable Name | Value Type | Variable Type | ||
---|---|---|---|---|
Arguments: | x | real, complex | vector | |
i | real | scalar | ||
Result: | z | real, complex | scalar |
Example:
ID | Description | Type | Value | Expression | |
---|---|---|---|---|---|
x | REAL VECTOR |
| [0,1,2] | ||
i | REAL | 0 | 0 | ||
z | Result | REAL | 0 | x[i] |
Matrix Index: x[i,j]
The operation returns the matrix element of the (i + 1)-th row on the (j + 1)-th column of the matrix x.
The index of the rows is defined within and for the columns
Variable Name | Value Type | Variable Type | ||
---|---|---|---|---|
Arguments: | x | real, complex | matrix | |
i | real | scalar | ||
j | real | scalar | ||
Result: | z | real, complex | scalar |
Example:
ID | Description | Type | Value | Expression | |
---|---|---|---|---|---|
x | Argument | REAL MATRIX |
| [[1,2],[3,4],[5,6]] | |
i | Argument | REAL | 0 | 0 | |
j | Argument | REAL | 1 | 1 | |
z | Result | REAL | 2 | x[i,j] |
Matrix Index: x[i,]
The operation x[i,] returns the (i+1)-th row the matrix, xy-data or signal x.
Variable Name | Value Type | Variable Type | ||
---|---|---|---|---|
Arguments: | x | real, complex | matrix | |
i | real | scalar | ||
Result: | z | real, complex | vector |
Example:
ID | Description | Type | Value | Expression | |
---|---|---|---|---|---|
x | Argument | REAL MATRIX |
| [[1,2],[3,4],[5,6]] | |
i | Argument | REAL | 0 | 0 | |
z | Result | REAL VECTOR |
| x[i,] |
Matrix Index: x[,j]
The operation x[,j] returns the (j+1)-th row the matrix, xy-data or signal x.
Variable Name | Value Type | Variable Type | ||
---|---|---|---|---|
Arguments: | x | real, complex | matrix | |
i | real | scalar | ||
Result: | z | real, complex | vector |
Example:
ID | Description | Type | Value | Expression | |
---|---|---|---|---|---|
x | Argument | REAL MATRIX |
| [[1,2],[3,4],[5,6]] | |
i | Argument | REAL | 1 | 1 | |
z | Result | REAL VECTOR |
| x[,i] |