2 deleted 3 characters in body
source | link

Since you state outer Table:

How can I save the output of the Nested Table to a file for every iteration of the outer Table and prevent any List from being returned by Mathematica?

It seems to me that you want something like this (note >>>>>>):

Do[Table[x = 20; y = 30; 2 i x + 3 j y, {i, 10}] >>> "accum.dat", {j, 3}]

Which produces a file with contents:

{130, 170, 210, 250, 290, 330, 370, 410, 450, 490}
{220, 260, 300, 340, 380, 420, 460, 500, 540, 580}
{310, 350, 390, 430, 470, 510, 550, 590, 630, 670}

To read this file as a matrix just use: ReadList["accum.dat"]

The difference compared to the last line of AugR's answer (which I voted for) is that this outputs each row as it is created rather than at the end, which would be useful if memory is a concern or if calculation may be interrupted and you want to save results as you go.

Since you state outer Table:

How can I save the output of the Nested Table to a file for every iteration of the outer Table and prevent any List from being returned by Mathematica?

It seems to me that you want something like this (note >>>):

Do[Table[x = 20; y = 30; 2 i x + 3 j y, {i, 10}] >>> "accum.dat", {j, 3}]

Which produces a file with contents:

{130, 170, 210, 250, 290, 330, 370, 410, 450, 490}
{220, 260, 300, 340, 380, 420, 460, 500, 540, 580}
{310, 350, 390, 430, 470, 510, 550, 590, 630, 670}

To read this file as a matrix just use: ReadList["accum.dat"]

The difference compared to the last line of AugR's answer (which I voted for) is that this outputs each row as it is created rather than at the end, which would be useful if memory is a concern or if calculation may be interrupted and you want to save results as you go.

Since you state outer Table:

How can I save the output of the Nested Table to a file for every iteration of the outer Table and prevent any List from being returned by Mathematica?

It seems to me that you want something like this (note >>>):

Do[Table[x = 20; y = 30; 2 i x + 3 j y, {i, 10}] >>> "accum.dat", {j, 3}]

Which produces a file with contents:

{130, 170, 210, 250, 290, 330, 370, 410, 450, 490}
{220, 260, 300, 340, 380, 420, 460, 500, 540, 580}
{310, 350, 390, 430, 470, 510, 550, 590, 630, 670}

To read this file as a matrix just use: ReadList["accum.dat"]

The difference compared to the last line of AugR's answer (which I voted for) is that this outputs each row as it is created rather than at the end, which would be useful if memory is a concern or if calculation may be interrupted and you want to save results as you go.

1
source | link

Since you state outer Table:

How can I save the output of the Nested Table to a file for every iteration of the outer Table and prevent any List from being returned by Mathematica?

It seems to me that you want something like this (note >>>):

Do[Table[x = 20; y = 30; 2 i x + 3 j y, {i, 10}] >>> "accum.dat", {j, 3}]

Which produces a file with contents:

{130, 170, 210, 250, 290, 330, 370, 410, 450, 490}
{220, 260, 300, 340, 380, 420, 460, 500, 540, 580}
{310, 350, 390, 430, 470, 510, 550, 590, 630, 670}

To read this file as a matrix just use: ReadList["accum.dat"]

The difference compared to the last line of AugR's answer (which I voted for) is that this outputs each row as it is created rather than at the end, which would be useful if memory is a concern or if calculation may be interrupted and you want to save results as you go.