Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: how to get rid of quotation marks in out put data

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92285] Re: how to get rid of quotation marks in out put data
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Fri, 26 Sep 2008 06:25:26 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK

Pasha wrote:

 > I have a data in this format (i get it from StringSplit):
 > {{"2","3",............},{"1","2",.....},....}
 > I would like to plot these data but I can not and I guess it
 > is because of
 > the "" (quotation marks).
 > Do you have any idea how I can get rid of them?

Use *ToExpression* to convert character strings into regular Mathematica 
expressions. For instance,

     In[1]:= data = {{"2", "3"}, {"1", "2"}}
             data // FullForm
             data = ToExpression[data]
             data // FullForm

     Out[1]= {{"2", "3"}, {"1", "2"}}

     Out[2]= List[List["2", "3"], List["1", "2"]]

     Out[3]= {{2, 3}, {1, 2}}

     Out[4]= List[List[2, 3], List[1, 2]]

Regards,
-- Jean-Marc


  • Prev by Date: Re: Function changes in a program
  • Next by Date: Workbench complains about an invalid LinkObject number
  • Previous by thread: Re: how to get rid of quotation marks in out put data
  • Next by thread: Open DumpSave in new context?