MathGroup Archive 2006

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

Search the Archive

Re: How to write formatted number into a file

  • To: mathgroup at smc.vnet.net
  • Subject: [mg66617] Re: [mg66607] How to write formatted number into a file
  • From: "David Annetts" <davidannetts at aapt.net.au>
  • Date: Wed, 24 May 2006 03:01:58 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

> Hi, I am try to write a formated number into a file. For 
> example, Writing
> 6.661999999999944*10^-6 as 6.66200E-06 .
> If I use ScientificForm and can see the format 6.66200E-06 in 
> mathematica, however when i am trying to write it into a file 
> like the what i see in mathematica, the I see ScientificForm 
> instead of the result i desired.
> How to tackle this problem?

But what did you use to write the numbers to a file?

For me under Mathematica 5.2, after generating some data,

	inp = Table[Random[], {5}];
	fin = inp * 10^# & /@ Range[-12, 12, 2];

The command

	Export["test.dat", fin];

works just fine.  As can be seen from online help on Export[] and
NumberForm[], there are more options available if you need a particular
alignment or to lose scientific notation entirely.

Regards,

Dave.


  • Prev by Date: help!!
  • Next by Date: M100: An Introduction To Mathematica
  • Previous by thread: Re: How to write formatted number into a file
  • Next by thread: Re: How to write formatted number into a file