Re: writing real numeric data to file in scientific form
- To: mathgroup at smc.vnet.net
- Subject: [mg130816] Re: writing real numeric data to file in scientific form
- From: "McHale, Paul" <Paul.McHale at excelitas.com>
- Date: Sat, 18 May 2013 02:39:06 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-outx@smc.vnet.net
- Delivered-to: mathgroup-newsendx@smc.vnet.net
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 at 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 at Excelitas.com www.excelitas.com