CoCoA:Submat

From ApCoCoAWiki
Revision as of 10:02, 24 October 2007 by XMLBot (talk | contribs) (pushing XML rev. 1.46, again)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Submat

submatrix

Description

This function returns the submatrix of M formed by the rows listed

in R and the columns listed in C. If M is a list, it is interpreted

as a matrix in the natural way.

Example

  M := Mat([[1,2,3,4,5],[6,7,8,9,10],[11,12,13,14,15]]);
  Submat(M,[1,3],3..5);
Mat([
  [3, 4, 5],
  [13, 14, 15]
])
-------------------------------
  L := [[1,2,3],[4,5,6]];
  Submat(L,[2],[1,3]);
Mat([
  [4, 6]
])
-------------------------------

Syntax

Submat(M:LIST or MAT,R:LIST of INT,C:LIST of INT):MAT

Introduction to Matrices

Minors

   <type>list</type>
   <type>matrix</type>