#### D.3.1.11 submat

Procedure from library `matrix.lib` (see matrix_lib).

Usage:
  submat(A,r,c); A=matrix, r,c=intvec

Return:
  matrix, submatrix of A with rows specified by intvec r and columns specified by intvec c.

Example:

    LIB "matrix.lib";
    ring R=32003,(x,y,z),lp;
    matrix A[4][4]=x,y,z,0,1,2,3,4,5,6,7,8,9,x2,y2,z2;
    print(A);
    ==> x,y, z, 0,
    ==> 1,2, 3, 4,
    ==> 5,6, 7, 8,
    ==> 9,x2,y2,z2
    intvec v=1,3,4;
    matrix B=submat(A,v,1..3);
    print(B);
    ==> x,y, z,
    ==> 5,6, 7,
    ==> 9,x2,y2

User manual for Singular version 4.4.1, 2025, generated by texi2html.