up previous next
SetCol    --    set a list as a column into a matrix


Syntax
SetCol(ref M: MAT, j: INT, L: LIST)

Description
This procedure sets the elements in L as entries of the j -th column in the matrix M ; it returns nothing!

Example
/**/  M := IdentityMat(QQ, 5);
/**/  SetCol(ref M, 1, [2,3,4,5,6]);
/**/  M;
matrix(QQ,
 [[2, 0, 0, 0, 0],
  [3, 1, 0, 0, 0],
  [4, 0, 1, 0, 0],
  [5, 0, 0, 1, 0],
  [6, 0, 0, 0, 1]])

See Also