add_columns INDEX

ADD_COLUMNS _ _ _ _ _ _ _ _ _ _ _ _ operator

Add columns, add rows:

syntax:

add_columns(<matrix>,<c1>,<c2>,<expr>)

<matrix> :- a matrix.

<c1>,<c2> :- positive integers.

<expr> :- a scalar expression.

The Operator add_columns replaces column <\meta{c2>} of <matrix> by <expr> * column(<matrix>,<c1>) + column(<matrix>,<c2>).

add_rowsperforms the equivalent task on the rows of <matrix>.

examples:



add_columns(A,1,2,x); 

  [1   x + 2   3]
  [             ]
  [4  4*x + 5  6]
  [             ]
  [7  7*x + 8  9]



add_rows(A,2,3,5); 

  [1   2   3 ]
  [          ]
  [4   5   6 ]
  [          ]
  [27  33  39]

Related functions: add_to_columns, add_to_rows, mult_columns, mult_rows.