Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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...

m=ToString@FortranForm[0.000003]
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.

Thanks,

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
Paul.McHale@Excelitas.com
www.excelitas.com






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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.