This is an old version, view current version.

4.4 Array Concatenation

T append_array(T x, T y)
Return the concatenation of two arrays in the order of the arguments. T must be an N-dimensional array of any Stan type (with a maximum N of 7). All dimensions but the first must match.

For example, the following code appends two three dimensional arrays of matrices together. Note that all dimensions except the first match. Any mismatches will cause an error to be thrown.

 matrix[4, 6] x1[2, 1, 7];
 matrix[4, 6] x2[3, 1, 7];
 matrix[4, 6] x3[5, 1, 7];
 x3 = append_array(x1, x2);