commands → augment

augment(A,B)

The augment command augments a matrix A by adding either a single column vector B, or columns from a matrix B. The number of rows of A and B must match.

Examples

# augment matrix with the identity
augment([[1,2],[3,4]], [[1,0],[0,1]]);
	[[1, 2, 1, 0], [3, 4, 0, 1]]