Stacking Matrices |
Hereinafter the following convention is used:
– small Greek letters are used to denote scalars;
– small Latin letters are used to denote vectors;
– capital Latin letters are used to denote matrices.
Stacking matrices provides methods to concatenate two matrices horizontally, vertically or diagonally.
Operation | Description | Performance |
---|---|---|
horizontal stack | Stacks the given matrices horizontally. The new matrix is n-by-m+k matrix. given: the result will be: Returning result:HorizontalStack(Matrix, Matrix) Out of place: | |
vertical stack | Stacks the given matrices vertically. The new matrix is n+l-by-m matrix. given: the result will be: Returning result:Out of place: | |
diagonal stack | Stacks the given matrices diagonally. The new matrix is n+l-by-m+k matrix. The values of the off-diagonal blocks are unchanged. given: the result will be: Returning result:Out of place: |