Previous Up Next

2.42.20  Exchange two rows : rowSwap

rowSwap takes three arguments : a matrix A and two integers n1 and n2.
rowSwap returns the matrix obtained by exchanging in A, the row of index n1 with the row of index n2.
Input :

rowSwap([[1,2],[3,4]],0,1)

Output :

[[3,4],[1,2]]

Previous Up Next