sub_matrix INDEX

SUB_MATRIX _ _ _ _ _ _ _ _ _ _ _ _ operator

syntax:

sub_matrix(<matrix>,<row\_list>,<column\_list>)

<matrix> :- a matrix. <row\_list>, <column\_list> :- either a positive integer or a list of positive integers.

namesub_matrix produces the matrix consisting of the intersection of the rows specified in <row\_list> and the columns specified in <column\_list>.

examples:



sub_matrix(A,{1,3},{2,3}); 

  [2  3]
  [    ]
  [8  9]

Related functions: augment_columns, stack_rows.