MATLAB: I have two martices

coordinate matrix from two different matrices

X =
1.0000 1.2000 1.4000 1.6000 1.8000 2.0000
1.0000 1.2000 1.4000 1.6000 1.8000 2.0000
1.0000 1.2000 1.4000 1.6000 1.8000 2.0000
1.0000 1.2000 1.4000 1.6000 1.8000 2.0000
1.0000 1.2000 1.4000 1.6000 1.8000 2.0000
1.0000 1.2000 1.4000 1.6000 1.8000 2.0000
and Y=
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.2000 1.2000 1.2000 1.2000 1.2000 1.2000
1.4000 1.4000 1.4000 1.4000 1.4000 1.4000
1.6000 1.6000 1.6000 1.6000 1.6000 1.6000
1.8000 1.8000 1.8000 1.8000 1.8000 1.8000
2.0000 2.0000 2.0000 2.0000 2.0000 2.0000
and i need an n*2 matrix by pairing up corresponding elements of each of the matrices x and y. the
ex [ 1 1; 1.2 1; 1.4 1; 1.6 1; 1.8 1; 2 1; 1 1.2; 1.2 1.2;...............] and so on

Best Answer

x = [1 2; 3 4]
y = [5 6; 7 8]
z = [x(:) y(:)]