linalg(deprecated)/stackmatrix - Maple Help

Home : Support : Online Help : linalg(deprecated)/stackmatrix

linalg(deprecated)

 stackmatrix
 join two or more matrices together vertically

 Calling Sequence stackmatrix(A, B,...)

Parameters

 A, B, ... - matrices or vectors

Description

 • Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[Matrix], instead.
 - For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
 • The function stackmatrix joins two or more matrices or vectors together vertically, where a vector is interpreted as a row vector. The matrices and vectors must have the same number of columns.
 • The command with(linalg,stackmatrix) allows the use of the abbreviated form of this command.

Examples

Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[Matrix], instead.

 > $\mathrm{with}\left(\mathrm{linalg}\right):$
 > $a≔\mathrm{matrix}\left(2,2,\left[1,2,3,4\right]\right)$
 ${a}{≔}\left[\begin{array}{cc}{1}& {2}\\ {3}& {4}\end{array}\right]$ (1)
 > $b≔\mathrm{matrix}\left(2,2,\left[5,6,7,8\right]\right)$
 ${b}{≔}\left[\begin{array}{cc}{5}& {6}\\ {7}& {8}\end{array}\right]$ (2)
 > $\mathrm{stackmatrix}\left(a,b\right)$
 $\left[\begin{array}{cc}{1}& {2}\\ {3}& {4}\\ {5}& {6}\\ {7}& {8}\end{array}\right]$ (3)
 > $v≔\mathrm{vector}\left(2,\left[1,2\right]\right)$
 ${v}{≔}\left[\begin{array}{cc}{1}& {2}\end{array}\right]$ (4)
 > $\mathrm{stackmatrix}\left(v,b,v\right)$
 $\left[\begin{array}{cc}{1}& {2}\\ {5}& {6}\\ {7}& {8}\\ {1}& {2}\end{array}\right]$ (5)