The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: writing real numeric data to file in scientific form
Replies: 1   Last Post: May 18, 2013 2:38 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
McHale, Paul

Posts: 60
Registered: 5/29/11
Re: writing real numeric data to file in scientific form
Posted: May 18, 2013 2:38 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I think what you are looking for is FortranForm[]. I use it exclusively now.

Here is writing it out and reading it back...

ToExpression[StringReplace[m,"e-"-> "*10^"]]

If you write your data to CSV format, it can be read back in with Scientific notation without issue. CSV format really rocks with Mathematica. I still use ToString@FortranForm[] for formatting prior to writing to CSV. On read, you will get numbers back and don't need the second line above.


Paul McHale | Electrical Engineer, Energetic Systems | Excelitas Technologies Corp.

Office: +1 937.865.3004 | Fax: +1 937.865.5170
1100 Vanguard Boulevard, Miamisburg, OH 45342-0312

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.