5
$\begingroup$

Consider the following list of tables:

listtemp[n_] := Table[RandomReal[{0, 1}, {2, 2}], n];

How to join its elements at the level 2 in a compact way for arbitrary n?

Say, for

list5=listtemp[5];

the desired result obtained in the tedious way is

Join[list5[[1]],list5[[2]],list5[[3]],list5[[4]],list5[[5]],2];
$\endgroup$

1 Answer 1

10
$\begingroup$

Use

Join[##, 2] & @@ list5

or

 Join[Sequence @@ list5, 2]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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