Previous Up Next

6.50.11  Échanger deux colonnes : colSwap swapcol colswap

rowSwap a trois arguments : une matrice A et deux entiers n1 et n2.
rowSwap renvoie la matrice obtenue en échangeant dans A les lignes n1 et n2.
On tape :

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

On obtient :

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

Previous Up Next