[Date Index]
[Thread Index]
[Author Index]
Re: how to get rid of quotation marks in out put data
*To*: mathgroup at smc.vnet.net
*Subject*: [mg92267] Re: how to get rid of quotation marks in out put data
*From*: Bill Rowe <readnews at sbcglobal.net>
*Date*: Thu, 25 Sep 2008 05:31:51 -0400 (EDT)
On 9/24/08 at 3:30 AM, karami at geo.uu.nl (Pasha Karami) 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?
I assume your real question is how to convert numbers formatted
as strings to numbers you can manipulate as numbers in
Mathematica. The answer is to use ToExpression. That is
ToExpession["2"]
will output the integer 2 that can be used in subsequent operations.
If there are quotes embedded in the string you need to convert
to numbers, these can be removed using StringReplace. Specifically,
StringReplace[string, "\""->""]
will remove any embedded quote characters. But the result of
this StringRepplace is still a string, not a number you can add,
subtract etc from other numbers.
Prev by Date:
**Re: Re: the graphic of a function**
Next by Date:
**Re: Re: Re: External packages, Manipulate, and MathPlayer**
Previous by thread:
**Re: how to get rid of quotation marks in out put data**
Next by thread:
**Re: how to get rid of quotation marks in out put data**
| |