CASTI-89 TITANIUM · CALC89
rowSwap(
Swaps two rows of a matrix and returns the new matrix.
Syntax
rowSwap(matrix, row1, row2)
- Group
- Matrix
- Arguments
- Takes the matrix and the numbers of the two rows.
- Availability
- Included
- Menu path
- MATH ▸ Matrix ▸ rowSwap(
Example
| Input | Result |
|---|---|
| rowSwap([[1,2,3][4,5,6][7,8,9]],1,3) | [[7,8,9][4,5,6][1,2,3]] |
Typing rowSwap([[1,2,3][4,5,6][7,8,9]],1,3) on the home screen and pressing ENTER returns [[7,8,9][4,5,6][1,2,3]].
Keystrokes on the TI-89 Titanium
2NDMATH4▶▼×13ENTER
The same key sequence inserts rowSwap( in Calc89, and the AI tutor shows it step by step on the on-screen keypad.
Related commands
- rref(Returns the reduced row echelon form of a matrix.
- simult(Solves a system of linear equations given as a coefficient matrix and a column of constants, and returns the solution as a column vector.
- subMat(Returns the part of a matrix between a start row and column and an end row and column.
- 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.