Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Import ASCII-Data' topicStudent Support Forum > General > "Import ASCII-Data"

Next Comment >Help | Reply To Topic
Author Comment/Response
Heiko Dahm
04/11/00 05:52am

Opening a datafile with numbers and letters by data=ReadList[ToFileName[''dir'',''file''],Word] I get a List with the Numbers of the opened File. But when I want to count with these Numbers they appear like variables. E.g. N[data[[1]]+data[[3]]] Mathematica returns 7+3 but I expect 10.
Opening the ASCII-file with data=ReadList[ToFileName[''dir'',''file''],Number] I get the following error-message:
Read::readn: Syntax error reading a real number from the file.

How can I open such an ASCII-file with numbers and letters to count with the numbers?

Thank you for helping me
Yours
Heiko

URL: ,

Subject (listing for 'Import ASCII-Data')
Author Date Posted
Import ASCII-Data Heiko Dahm 04/11/00 05:52am
Re: Import ASCII-Data Aaron Honecker 04/11/00 5:57pm
Next Comment >Help | Reply To Topic