2

I am having an issue about how to export data in its scientific form using Mathematica.

To be concrete, I define a list

alist = {2344. 1111111, 0.0002223344};
ScientificForm[%]
Export["test.dat", %]

but it turns out that doesn't work. Is there any other way to achieve this? Also, what can I do to control the number of digits exported?

Any idea?

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
user12691
  • 21
  • 2

1 Answers1

8
Export["test.dat",
   NumberForm[
     alist, 
     NumberFormat -> (Row[{#1, "E", #3}] &), 
     ExponentFunction -> (3 Quotient[#, 3] &)
   ], 
   "Table"
]

(*   ==> {2.34411E3, 222.334E-6} *)
Sjoerd C. de Vries
  • 65,815
  • 14
  • 188
  • 323