Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: writing real numeric data to file in scientific form

10 views
Skip to first unread message

McHale, Paul

unread,
May 18, 2013, 2:38:11 AM5/18/13
to
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....@Excelitas.com
www.excelitas.com



0 new messages