MATLAB: Convert a 1*16 matrix to a 2*8 matrix

1*16 to 2*8

I have a matrix of size 1*16 like [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] i want to convert it to a 2*8 matrix like [1 2 3 4 5 6 7 8;9 10 11 12 13 14 15 16] (i.e the first eight elements in the first row and the second eight elements in the second row)

Best Answer

>> V = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16];
>> reshape(V,[],2).'
ans =
1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16