Top
Back: diag
Forward: flatten
FastBack:
FastForward:
Up: matrix_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.3.1.4 dsum

Procedure from library matrix.lib (see matrix_lib).

Usage:
dsum(A1,A2,..); A1,A2,... matrices

Return:
matrix, direct sum of A1,A2,...

Example:
 
LIB "matrix.lib";
ring r = 0,(x,y,z),ds;
matrix A[3][3] = 1,2,3,4,5,6,7,8,9;
matrix B[2][2] = 1,x,y,z;
print(A);
==> 1,2,3,
==> 4,5,6,
==> 7,8,9 
print(B);
==> 1,x,
==> y,z 
print(dsum(A,B));
==> 1,2,3,0,0,
==> 4,5,6,0,0,
==> 7,8,9,0,0,
==> 0,0,0,1,x,
==> 0,0,0,y,z 


Top Back: diag Forward: flatten FastBack: FastForward: Up: matrix_lib Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 4-0-3, 2016, generated by texi2html.