# How to separate a vector into two vectors, one having the first half of my original vector and the other having the second half

I have a set of n vectors with an even length. Let us make an easy example with 3 vectors of length=4:

 a={a1,a2,a3,a4}
b={b1,b2,b3,b4}
c={c1,c2,c3,c4}


I want to create the vectors:

 d1={a1,a2}
d2={a3,a4}

e1={b1,b2}
e2={b3,b4}

f1={c1,c2}
f2={c3,c4}


I suppose I have to use GatherBy, but I have not found the way to get what I want.

-
Have a look at Partition. –  b.gatessucks Feb 26 '13 at 15:58
This is the latest of many questions you have asked that are all incorrectly tagged [sparse-arrays]. Please ensure that you use tags that are relevant to the topic of your question. –  Oleksandr R. Feb 26 '13 at 16:20

a = {a1, a2, a3, a4}; b = {b1, b2, b3, b4}; c = {c1, c2, c3, c4};
{d1, d2, e1, e2, f1, f2} = Partition[Join[a, b, c], 2]


Also

{{d1, d2}, {e1, e2}, {f1, f2}} = Partition[#, 2] & /@ {a, b, c}

-
You beat me by seconds! +1, I respectfully withdrawal –  Jagra Feb 26 '13 at 16:19
Actually wouldn't this prove more general for even lengthed lists: {{d1, d2}, {e1, e2}, {f1, f2}} = Partition[#, Length[#]/2] & /@ {a, b, c}; –  Jagra Feb 26 '13 at 16:21
@Jagra The question could be "generalized" in every direction you may think of :) . I really dislike naming sublists like that, no need. –  belisarius Feb 26 '13 at 16:42