MathGroup Archive 2004

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

Search the Archive

Re: how to take quotation marks away ?


On Jun 2, 2004, at 4:21 AM, Florian Jaccard wrote:

> Dear Mathematica-specialists,
>
> I have a  (long)  list of the form   {{"42.1,3.3"},{"3.1,4.2"}}
>
> How can I transform it to obtain  {{42.1,3.3},{3.1,4.2}} ?
>
> I tried ToExpression, but it failed.
>

Here's one way:

wrap[x_String] := ToExpression[StringJoin["{", x, "}"]]

Apply[wrap,#]&  /@ {{"42.1,3.3"}, {"3.1,4.2"}}


-----
Selwyn Hollis
http://www.math.armstrong.edu/faculty/hollis
(edit reply-to to reply)


  • Prev by Date: Re: Disabling Shadow Errors, XEmacs with Mathematica, coloring
  • Next by Date: Re: how to take quotation marks away ?
  • Previous by thread: how to take quotation marks away ?
  • Next by thread: Re: how to take quotation marks away ?