Note: This might be trivial for many of the users but i am new to mathematica so i don’t know!!!

Question:

Suppose i have three list of data as follows:

List1 = {{a11}, {a21, a22}, {a31, a32, a33}};

List2 = {{b11}, {b21, b22}, {b31, b32, b33}};

List3 = {{c11}, {c21, c22}, {c31, c32, c33}};

Here all three list have the same length, i.e.

Length[List1]=Length[List2]=Length[List3]Length[List1]=Length[List2]=Length[List3]Length[{List}_1]=Length[{List}_2]=Length[{List}_3]

Can someone write me a simple fast function ff that can do the following:

{{a11, b11, c11}, {a21, b21, c21}, {a31, b31, c31}, {a22, b22,

c22}, {a32, b32, c32}, {a33, b33, c33}}

=================

1

This looks very much like Mathematica code copied as LaTeX. I strongly suggest refraining from using subscripts in the classical manner in Mathematica. All sorts of issues are bound to come up.

– LLlAMnYP

Apr 17 ’15 at 21:30

=================

1 Answer

1

=================

Edit:

f = Flatten[{##}, {3, 2}] &

ref: Flatten command: matrix as second argument

Old:

f[lists__]:=Transpose[Flatten/@ {lists}]