I am trying to print the following as output in lua.
inertia_x = {
{46.774, 0., 0.},
{0., 8.597, 0.},
{0., 0., 50.082}
}
x = {mass = 933.0, com = {0.0, 143.52, 0.0}, inertia_x}
print(x)
This code was written in a text editor and named sample.lua
Now I am using linux and I go to the correct directory while the .lua file is stored and I call
$ lua sample.lua
and output is table: 0x55c9fb81e190
I would ideally like to get x printed like a list
This is my 2nd lua program after Hello World. Very new to Linux and programming as well.
I would greatly appreciate your help!