CASTI-89 TITANIUM · CALC89
subMat(
Returns the part of a matrix between a start row and column and an end row and column.
Syntax
subMat(matrix[, r1, c1, r2, c2])
- Group
- Matrix
- Arguments
- Takes the matrix and optional start row, start column, end row and end column.
- Availability
- Included
Example
| Input | Result |
|---|---|
| subMat([[1,2,3][4,5,6][7,8,9]],2,1,3,2) | [[4,5][7,8]] |
Typing subMat([[1,2,3][4,5,6][7,8,9]],2,1,3,2) on the home screen and pressing ENTER returns [[4,5][7,8]].
Related commands
- trace(Returns the trace of a square matrix, the sum of the entries on its main diagonal.
- transpose(Returns the transpose of a matrix, with rows and columns swapped.
- unitV(Returns the unit vector in the direction of a vector, the vector divided by its length.
- .*Multiplies two matrices element by element, unlike the normal matrix product.
- .+Adds element by element: each entry of the first matrix is added to the matching entry of the second, or to a single value.
- .-Subtracts element by element: the matching entry of the second matrix, or a single value, is subtracted from each entry.
- ./Divides element by element: each entry is divided by the matching entry of the second matrix, or by a single value.
- .^Raises each entry of a matrix to a power element by element, instead of computing a matrix power.