Returns an vector or matrix formed by placing arguments top to bottom. Arguments are arrays having the same number of columns or they are scalars and column vectors.

In the case of scalar values the stack function returns a column vector containing the list of arguments.

In the next example three column vectors

In order to obtain a matrix the vectors must be in row order. The three row vectors

The row vectors can easily be translated to columns in the matrix by applying the matrix transpose to the stack function.

See also

Return to