MATLAB: How to make two vectors into one alternating vector with using for loop

alternatingMATLAB

Hello, I'm a beginner user of MatLab.
I want to make these two vectors into one alternating vector like below but, i don't know how to make it.
A = [0, 1, 2, 3, 4, 5]
B = [6, 7, 8, 9 ,10, 11]
Z = [0, 6, 1, 7, 2, 8, 3, 9, 4, 10, 5, 11]
without using for loop then i can make the vector with using the reshape function, but i have no idea about having to use the for loop.

Best Answer

Z=[A;B];
Z=Z(:)';