get_columns INDEX

GET_COLUMNS _ _ _ _ _ _ _ _ _ _ _ _ operator

Get columns, get rows:

syntax:

get_columns(<matrix>,<column\_list>)

<matrix> :- a matrix.

<c> :- either a positive integer or a list of positive integers.

get_columnsremoves the columns of <matrix> specified in <column\_list> and returns them as a list of column matrices.

get_rowsperforms the same task on the rows of <matrix>.

examples:



get_columns(A,{1,3}); 

  {
   [1]
   [ ]
   [4]
   [ ]
   [7]
   ,
   [3]
   [ ]
   [6]
   [ ]
   [9]
  }



get_rows(A,2); 

  {
   [4  5  6]
  }

Related functions: augment_columns, stack_rows, sub_matrix.