The blockmatrix combines several matrices into one larger matrix.
If the matrices in L each have the same dimension p × q, the result will be a matrix with dimension p*n × q*m.
Examples.
⎡ ⎢ ⎢ ⎢ ⎣ |
| ⎤ ⎥ ⎥ ⎥ ⎦ |
⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ |
| ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ |
⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ |
| ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ |
⎡ ⎢ ⎢ ⎢ ⎣ |
| ⎤ ⎥ ⎥ ⎥ ⎦ |
A:=[[1,1],[1,1]];B:=[[1],[1]]:; |
blockmatrix(2,3,[2*A,3*A,4*A,5*B,newMat(2,4),6*B]) |
⎡ ⎢ ⎢ ⎢ ⎣ |
| ⎤ ⎥ ⎥ ⎥ ⎦ |
The semi_augment command concatenates two matrices with the same number of columns.
Examples.
⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ |
| ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ |
⎡ ⎢ ⎣ |
| ⎤ ⎥ ⎦ |
⎡ ⎣ |
| ⎤ ⎦ |
⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ |
| ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ |
⎡ ⎢ ⎣ |
| ⎤ ⎥ ⎦ |
The augment command glues two matrices, either side by side
or one on top of the other.
Here, concat can be used as a synonym for augment.
Examples.
⎡ ⎢ ⎣ |
| ⎤ ⎥ ⎦ |
⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ |
| ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ |
⎡ ⎣ |
| ⎤ ⎦ |
Note that if A and B have the same dimension, then augment(A,B) will return a matrix with the same number of rows as A and B by horizontal gluing. In that case, if you want to combine them by vertical gluing, you must use semi_augment(A,B).
The border command adds a column to a matrix.
Examples.
⎡ ⎢ ⎣ |
| ⎤ ⎥ ⎦ |
⎡ ⎢ ⎢ ⎣ |
| ⎤ ⎥ ⎥ ⎦ |