I am new to Mathematica. I will try to do my best to write it effectively.
I have two questions:
Q1:
I have three tables which give me values as {x1,y1,z1} ,{x2,y2,z2}…The code is given below:
Table[Table[Table[ {xcord, ycord, zcord},
{xcord, 0, 50, 5}],
{ycord, 0, 50,5}],
{zcord, 50, 150, 10}]
Now I need an output like this
{1,x1,y1,z1}
{2,x2,y2,z2}
{3,x3,y3,z3}
.
.
{n,xn,yn,zn}
There are two problems with this.
First, I get my results formatted as something like this {x1,y1,z1},{x2,y2,z2} …. {xn,yn,zn}, but I want it formatted in this way:
{x1,y1,z1}
{x2,y2,z2}
{x3,y3,z3}
.
.
{xn,yn,zn}
Second, I can’t number each set of elements adding the numbers in front of each set of elements like
{1,x1,y1,z1}
{2,x2,y2,z2}
{3,x3,y3,z3}
.
.
{n,xn,yn,zn}
I tried to make separate tables for each set of co-ordinates and number these corresponding to each set of the co-ordinates. Then I tried to get each of them in separate columns and join them but still I haven’t been successful.
Q2:
I would like to separate the values obtained from the tables above into a grid system like the one below. Something like how we all do in Excel where all values reside in a separate cells.
Number X values Y Values Z values
1 x1 y1 z1
2 x2 y2 z2
.
.
n xn yn zn
Perhaps: