Re: solving equations
- To: mathgroup at smc.vnet.net
- Subject: [mg105892] Re: solving equations
- From: dr DanW <dmaxwarren at gmail.com>
- Date: Wed, 23 Dec 2009 02:43:13 -0500 (EST)
- References: <hgq28n$ged$1@smc.vnet.net>
Maria, You can't use a period in a symbol name; Mathematica interprets that as a dot product. You first have to replace the periods with a harmless character (I am using a bullet, entered into Mathematica as "escape \bu escape",) being careful not to replace the periods where they are being used as decimals: --- snip --- dots = ReadList["a.txt", Record, RecordSeparators -> {}] (* "Everybody stand back. I know regular expressions." -- http://imgs.xkcd.com/comics/regular_expressions.png *) nodots = StringReplace[dots[[1]], StringExpression[pre:LetterCharacter, ".", post:LetterCharacter] :> StringJoin[pre, "\[Bullet]", post]] Solve[ReadList[StringToStream[nodots], Expression], {x}] --- end --- Regards, Daniel