Re: Mathematica - convert engineering form to numeric data
- From: Daniel Lichtblau <danl@xxxxxxxxxxx>
- Date: Fri, 28 Sep 2007 12:48:25 -0700
On Sep 28, 1:48 pm, "Dave (from the UK)" <see-my-signat...@see-
below.com> wrote:
Richard J. Fateman wrote:
aEb does not mean a*10^b in Mathematica. Try a*^b .
Or use a CAS other than Mathematica.
RJF
I don't recall ever saying aEb meant a*10^b in Mathematica.
But -1.185637512E+002 in my data file does mean -1.185637512 x 10^2, or
-118.5637512.
Mathematica was not used to produce the data file. I want to read the
file in Mathematica, and somehow get Mathematica to know this is to be
interpreted as a*10^b. I can't belive there is not a function for doing
this, as I would expect others to have data files with this format too.
Otherwise, perhaps replacing "E" by 10^ will do. But that seems a bit of
a hack, but perhaps it is the best way.
--
Dave (from the UK)
Please note my email address changes periodically to avoid spam.
It is always of the form: month-y...@xxxxxxxxxxxx
Hitting reply will work for a few months only - later set it manually.
http://chessdb.sourceforge.net/- a Free open-source Chess Database
I think the example below is along the lines you want.
In[4]:= !cat /home/usr2/danl/values.dat
07:35:39 -1.185637512E+002 123.E-1
1.24375 5
In[6]:= InputForm[vals= Import["values.dat", "Table"]]
Out[6]//InputForm= {{"07:35:39", -118.5637512, 12.3}, {1.24375, 5}}
you have in mind.From here it should be straightforward to do the sort of extraction
By the way, I got the setting right from the documentation tutorial on
Import/Export.
tutorial/ImportingAndExportingFiles
Daniel Lichtblau
Wolfram Research
.
- Follow-Ups:
- References:
- Mathematica - convert engineering form to numeric data
- From: Dave
- Re: Mathematica - convert engineering form to numeric data
- From: Richard J. Fateman
- Re: Mathematica - convert engineering form to numeric data
- From: Dave (from the UK)
- Mathematica - convert engineering form to numeric data
- Prev by Date: Re: Mathematica - convert engineering form to numeric data
- Next by Date: Re: Mathematica - convert engineering form to numeric data
- Previous by thread: Re: Mathematica - convert engineering form to numeric data
- Next by thread: Re: Mathematica - convert engineering form to numeric data
- Index(es):
Relevant Pages
|
|