For example, I have data like this:
m = {{1,2,3},{4,5,6}}
It means 1,2,3 are available x position, 4,5,6 are available y position. The question is, how to get all available points? In this case, all available points are {{1,4},{1,5},{1,6},{2,4},{2,5},{2,6},{3,4},{3,5},{3,6}}
, but how can I write a general code to solve these problems, especially when dimension is much more than 2?
I found this problem is called Cartesian product. But I still have no idea how to solve it.
Tuples
$\endgroup$