Skip to main content
edited tags
Link
Mr.Wizard
  • 273.1k
  • 34
  • 595
  • 1.4k
Bumped by Community user
Tweeted twitter.com/StackMma/status/726653757837201408
edited tags
Link
Alexey Popkov
  • 62.3k
  • 7
  • 154
  • 375
Formatted code
Source Link
MarcoB
  • 67.7k
  • 18
  • 96
  • 198

In older versions of MathematicaMathematica you could use SpaceFormSpaceForm to leave a certain amount of spaces when writing to a file. For example, if we have the following data:

data = Table[{x, N[Exp[2 - x]]}, {x, 0, 40, 5}];

data = Table[{x, N[Exp[2 - x]]}, {x, 0, 40, 5}];

We can then write it to a file

MapThread[Write["file.txt", FortranForm[#], SpaceForm[4], FortranForm[#2]]&, Transpose[data]]

MapThread[Write["file.txt", FortranForm[#], SpaceForm[4], FortranForm[#2]]&, Transpose[data]]

You can still use SpaceFormSpaceForm in the current version of MathematicaMathematica but it seems there is no documentation for it. I'm just wondering if that function was replaced by a newer one or how to do the same thing with a documented function.

In older versions of Mathematica you could use SpaceForm to leave a certain amount of spaces when writing to a file. For example, if we have the following data:

data = Table[{x, N[Exp[2 - x]]}, {x, 0, 40, 5}];

We can then write it to a file

MapThread[Write["file.txt", FortranForm[#], SpaceForm[4], FortranForm[#2]]&, Transpose[data]]

You can still use SpaceForm in the current version of Mathematica but it seems there is no documentation for it. I'm just wondering if that function was replaced by a newer one or how to do the same thing with a documented function.

In older versions of Mathematica you could use SpaceForm to leave a certain amount of spaces when writing to a file. For example, if we have the following data:

data = Table[{x, N[Exp[2 - x]]}, {x, 0, 40, 5}];

We can then write it to a file

MapThread[Write["file.txt", FortranForm[#], SpaceForm[4], FortranForm[#2]]&, Transpose[data]]

You can still use SpaceForm in the current version of Mathematica but it seems there is no documentation for it. I'm just wondering if that function was replaced by a newer one or how to do the same thing with a documented function.

Source Link
JRad
  • 63
  • 4
Loading