Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'Changing strings to numbers' topicStudent Support Forum > General > "Changing strings to numbers"

Next Comment >Help | Reply To Topic
Author Comment/Response
10/07/06 01:51am


I am importing a rather large .dat file that consists of integers and fractions. The problem is that Mathmatica reads the fractions as strings: e.g. 1/12 is imported as "1/12" etc.

Any idea on how I can convert the strings to numbers? I do a ReplaceAll assignment DataNew=DataOld/.{"1/12"->1/12,...} but it's too tedious since I have many fractions.


URL: ,

Subject (listing for 'Changing strings to numbers')
Author Date Posted
Changing strings to numbers Vassilis 10/07/06 01:51am
Re: Changing strings to numbers Forum Modera... 10/08/06 8:54pm
Next Comment >Help | Reply To Topic