Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Outputting to file with fixed decimal digits

  • To: mathgroup at smc.vnet.net
  • Subject: [mg75318] Re: Outputting to file with fixed decimal digits
  • From: dh <dh at metrohm.ch>
  • Date: Wed, 25 Apr 2007 05:32:57 -0400 (EDT)
  • References: <f0ekbt$pnn$1@smc.vnet.net> <f0huph$a41$1@smc.vnet.net>


Hi,

you could try e.g.:

Export["d:/tmp/t.txt", d, "CSV", ConversionOptions -> {"FormatType" -> 

(PaddedForm[#, {6, 5}, NumberFormat -> (#1 <> "E" <> #3 &)] &)}];

this gives a file like:

  5.92872E11

  7.78517E11

  4.01861E11

  2.13665E9

hope this helps, Daniel



actuary at mchsi.com wrote:

> On Apr 21, 10:21 pm, "actu... at mchsi.com" <actu... at mchsi.com> wrote:

>> Hello:

>>

>> I'm trying to create a file that becomes input to another software

>> package.  I need to output real numbers with a fixed number of decimal

>> digits with spaces separating the numbers that I write to the file.

>>

>> I've  searched this group for assistance on my question and couldn't

>> find anything dealing with outputting to a file.

>>

>> Help would be greatly appreciated.

>>

>> Larry

> 

> Many thanks to Jean-Marc Guillet for his assistance insolving my

> Mathematica coding problem.

> 

> Larry

> 

> 




  • Prev by Date: Re: FourierTransform and removable singularities
  • Next by Date: Re: Re: Outputting to file with fixed decimal digits
  • Previous by thread: Re: Re: Outputting to file with fixed decimal digits
  • Next by thread: Re: Outputting to file with fixed decimal digits