Vertically concatenate matrices.
Syntax: @vcat(m1, m2[, m3, ...])
m#: matrix, vector, svector or sym
Return: matrix
Performs vertical concatenation of two matrix objects. Each of the m# must have the same number of columns.
The result will have the sum of the number of rows and the same number of columns as the m#.
For example, if m1 is a matrix with m rows and k columns, and m2 is a matrix with n rows and k columns, then @vcat will return a matrix with (m+n) rows and k columns.
Examples
vector v1 = @fill(1, 2, 3)
matrix k1 = @vcat(v1, 2*v1, 3*v1)
produces the matrix K1 which vertically stack the vectors V1, 2*V1 and 3*V1.
matrix g1 = @mnrnd(3, 3)
sym s1 = @identity(3)
matrix m1 = @vcat(g1, s1, v1.@t)
stacks the random normal matrix G1 on top of the identity matrix, and the row vector containing (1, 2, 3).
Cross-references