Given:
m = {{16, 2, 3, 13}, {{5, 11, 10, 8}, {9, 7, 6, 12}}, {4, 14, 15, 1}};
We could use Sequence to "unwrap" lists of depth 3:
Apply[Sequence, m, {-3}]
(* {{16, 2, 3, 13}, {5, 11, 10, 8}, {9, 7, 6, 12}, {4, 14, 15, 1}} *)
Equivalently:
Apply[##&, m, {-3}]
Direct replacement of nested lists can work too:
Replace[m, {x:_List...} :> x, {1}]
These approaches will work on variable-length rows:
m2 = {{1, 2}, {{3, 4, 5}, {6, 7, 8}}, {9, 10, 11}, {{12, 13}, {14, 15}, {16}}};
Apply[##&, m2, {-3}]
(* {{1, 2}, {3, 4, 5}, {6, 7, 8}, {9, 10, 11}, {12, 13}, {14, 15}, {16}} *)
If the nesting is variable-depth, we can use Reap and Sow:
m3 = {{1, 2}, {{3, 4}, {{5, 6}, {7, 8}}}, {{{{9, 10}}, {11, 12}}}};
Scan[Sow, m3, {-2}] // Reap // #[[2, 1]] &
(* {{1, 2}, {3, 4}, {5, 6}, {7, 8}, {9, 10}, {11, 12}} *)
mthat showsFlattenAt[m,1]does not work, rather than describing cases in which it will not work. – David G. Stork Apr 22 '15 at 22:08Partition[Flatten[m], 4]will be most efficient. – ciao Apr 22 '15 at 22:11