You can convert the full array into a list of pairs using Join
, Catenate
, or Flatten
:
Join @@ m
Catenate[m] (* version 10 or later *)
Flatten[m, 1]
(@@
is shorthand for Apply
. See also Partition
and ArrayReshape
.)
However there are arguably better ways to approach this problem from the outset than using Table
. Knowing that you want a "flat" output of pairs I would turn to Tuples
. The uniformly spaced numbers can be generated with Range
, which is Listable
, allowing this for your example:
Tuples @ Range[0, {1, 1}, .5]
{{0., 0.}, {0., 0.5}, {0., 1.}, {0.5, 0.}, {0.5, 0.5},
{0.5, 1.}, {1., 0.}, {1., 0.5}, {1., 1.}}
Generalized to ranges that do not share common values, in two equivalent forms
Tuples @ Range[{0, 7}, {1, 8}, {.5, 1}]
Tuples[{Range[0, 1, .5], Range[7, 8, 1]}]
{{0., 7}, {0., 8}, {0.5, 7}, {0.5, 8}, {1., 7}, {1., 8}}
{{0., 7}, {0., 8}, {0.5, 7}, {0.5, 8}, {1., 7}, {1., 8}}
If you did want a full array instead of a flat list of pairs then look at Array
and CoordinateBoundsArray
:
Array[List, {3, 3}, {{0`, 1}}]
CoordinateBoundsArray[{{0, 1}, {0, 1}}, 0.5]
The syntax of Array
is unlike the others in that the number of steps is specified rather than the size of the steps; this is sometimes more convenient.
Each of these generalized to the second example given for Tuples
:
Array[List, {3, 2}, {{0`, 1}, {7, 8}}]
CoordinateBoundsArray[{{0, 1}, {7, 8}}, {0.5, 1}]
{{{0., 7}, {0., 8}}, {{0.5, 7}, {0.5, 8}}, {{1., 7}, {1., 8}}}
{{{0., 7}, {0., 8}}, {{0.5, 7}, {0.5, 8}}, {{1., 7}, {1., 8}}}