Mathematica Asked by Muhammad Ali on January 27, 2021
I want to export the following matrix,
MatrixForm[Flatten /@Table[{f[a, b, c], a, b, c}, {a, 0, 2}, {b, 0, 2}, {c, 0, 2}]]
is there any way to export the first four columns and the next four columns below to the first exported columns?
So the one exported file (.dat or .txt) contains only 4 columns with many rows.
something like,
f[0,0,0] 0 0 0
f[1,0,0] 1 0 0
f[2,0,0] 2 0 0
f[0,0,1] 0 0 1
f[1,0,0] 1 0 1
f[2,0,1] 2 0 1
.
.
.
.
.
.
Export[
"file.txt",
Flatten[Transpose[
Table[{f[a, b, c], a, b, c}, {a, 0, 2}, {b, 0, 2}, {c, 0, 2}], {3,
1, 2}], 2],
"Table"
]
Answered by Henrik Schumacher on January 27, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP