up previous next
SwapCols    --    swap two columns in a matrix


Syntax
SwapCols(ref M: MAT, i: INT, j: INT)

Description
This procedure swaps the i-th and j-th columns in the matrix M; it returns nothing!

Example
/**/  M := StdDegLexMat(5);
/**/  SwapCols(ref M, 1,5);
/**/  M;
matrix(QQ,
 [[1, 1, 1, 1, 1],
  [0, 0, 0, 0, 1],
  [0, 1, 0, 0, 0],
  [0, 0, 1, 0, 0],
  [0, 0, 0, 1, 0]])

See Also