Re: How to get 2.334E+6 output form ?

*To*: mathgroup at smc.vnet.net*Subject*: [mg5725] Re: How to get 2.334E+6 output form ?*From*: dendzik at usctoux1.cto.us.edu.pl (Zbigniew Dendzik)*Date*: Sat, 11 Jan 1997 14:29:15 -0500*Organization*: Silesian University, Katowice, Poland*Sender*: owner-wri-mathgroup at wolfram.com

Zbigniew Dendzik (dendzik at usctoux1.cto.us.edu.pl) wrote: : Sergio Rojas (sergio at scisun.sci.ccny.cuny.edu) wrote: : (...) : : How can one tell to Mathematica to write : : 6 : : numbers in the form 2.3456E+6 instead of 2.3456*10^6 (or 2.3456 10 ). : (...) : : How the data can be written to a file without the braces and comma in : : between? : (...) : Hi Sergio, : Below is a simple piece of Mma code which I have written to solve this : problem. : RegularForm[x_]:= OutputForm[NumberForm[TableForm[x//N], ExponentFunction-> : (If[-10<#<10, Null, #]&), NumberFormat->(If[#3=="", SequenceForm[#1, #3], : SequenceForm[#1, "E", #3]]&)]] : If you put the above definition into the file named user.m (for example, : or simply add it to your init.m file), you will get: (...) Not long after I have posted above message I noticed that some data processing software (e.g. Origin (TM)) does not accept files with empty lines between data. Below is the code that writes converted data in more condensed form (without empty lines): RegularForm[x_]:= OutputForm[NumberForm[TableForm[x//N, TableSpacing->{0, 6}], ExponentFunction->(If[-10<#<10, Null, #]&), NumberFormat->(If[#3=="", SequenceForm[#1, #3], SequenceForm[#1, "E", #3]]&)]] --Zbigniew Dendzik dendzik at us.edu.pl