MATLAB: How to concatenate two matrices

MATLABmatrix

I need to concatenate two matrices
x=[ 1 2 3 4]
y=[5 6 7 8]
such that I get
z=[1 5 2 6 3 7 4 8]

Best Answer

z = [x;y];
z = z(:).'