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[{List}_1]=Length[{List}_2]=Length[{List}_3]$

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

{{a11, b11, c11}, {a21, b21, c21}, {a31, b31, c31}, {a22, b22, 
 c22}, {a32, b32, c32}, {a33, b33, c33}}
  • 1
    $\begingroup$ 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. $\endgroup$ – LLlAMnYP Apr 17 '15 at 21:30


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

ref: Flatten command: matrix as second argument


f[lists__]:=Transpose[Flatten/@ {lists}]
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.