Say I have two vectors of the same size and I would like to stack them together to form a matrix, what’s the function to perform that?
x = [1,2,3]
y = [4,5,6]
z = [7,8,9]
xy = zeros(Int64,2,3)
xy[1,:] = x
xy[2,:] = y
xy
I know that this will work, but is there a more efficient way? This needs to generalise to stacking n
vectors for some n
.