Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Removing backslash from lists' topicStudent Support Forum > General > Archives > "Removing backslash from lists"

Next Comment >Help | Reply To Topic
Author Comment/Response
Charlie
01/02/12 4:27pm

I am importing a list of numbers, and am trying to separate them out from backslashes and text which are scattered amongst them. I've been using a string replace for removing the textual parts of the file, but it's not working for backslashes, as \" seems to be some sort of command. Furthermore, the backslashes seem to interfere with making a .csv form table. (They make each row of numbers an individual element of a set, instead of each number in the row an element.)

E.g.
"-7.180465, 69.20484, -23.26176, -6.454868, 69.13457, -22.09055, \
-7.151867,\
68.98659, -20.87773, -8.552415, 68.92574, -20.92157, -9.329195, \
69.00353,\
-22.11707, -8.585853, 69.13342, -23.25399, -9.309389, 68.78234, \
-19.71141,\"

While data[[1]] returns
"-7.180465, 69.20484, -23.26176, -6.454868, 69.13457, -22.09055, \
-7.151867,\\"

Help?

URL: ,

Subject (listing for 'Removing backslash from lists')
Author Date Posted
Removing backslash from lists Charlie 01/02/12 4:27pm
Re: Removing backslash from lists toen 01/08/12 9:40pm
Re: Removing backslash from lists Charlie 01/09/12 7:48pm
Next Comment >Help | Reply To Topic