Re: Need to evaluate functions of the form y=5e+5 x1+2e-1x2, etc., were e means 10^
- To: mathgroup at smc.vnet.net
- Subject: [mg36881] Re: Need to evaluate functions of the form y=5e+5 x1+2e-1x2, etc., were e means 10^
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Tue, 1 Oct 2002 04:44:57 -0400 (EDT)
- Organization: Universitaet Leipzig
- References: <an68a1$s3$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
Hi, str = "5e+5x1+2e-1x2"; StringJoin[Characters[str] /. "e" -> "*10^"] // ToExpression ?? Work fine for me. But this type of output is typical generated by a C/FORTRAN Program and you should rewrite the formating rules in the code that produce this output. Regards Jens Chuck wrote: > > Hello, > > I have an odd problem. I need to use and simplify functions that have > been provided by a piece of software that insists on outputing the > functional results of a data mining proceedure, using "e" when > outputing numbers in scientific notation. > > I'm having difficultly using Replace, Hold, etc. to correctly evaluate > these types of function formats. For example, y = 5e+5x1+2e-1x2, > should be transcribed into 5 10^5 x1 + 0.2 x2. > > Thanks, > > Chuck