In the example you gave do this:
C = zeros(9,1);
C(1:2:end) = A;
C(2:2:end) = B;
For a general answer you need to define the generality you are seeking. Give us more information. For example, if the numbers in two vectors differs by more than one element, what do you wish as a result?