Re: ReadList and NumberPoint ?
- To: mathgroup at smc.vnet.net
- Subject: [mg36272] Re: [mg36224] ReadList and NumberPoint ?
- From: Tomas Garza <tgarza01 at prodigy.net.mx>
- Date: Thu, 29 Aug 2002 01:37:56 -0400 (EDT)
- References: <200208270607.CAA11589@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Perhaps you could use ReadList with the option Word, which will read your data in as strings. Then you may substitute commas with periods and convert to numbers with ToExpression? Tomas Garza Mexico City ----- Original Message ----- From: "sebastien maerten" <sebastien.maerten at iota.u-psud.fr> To: mathgroup at smc.vnet.net Subject: [mg36272] [mg36224] ReadList and NumberPoint ? > I'd like to import data from a file. The file is a standard ASCII text > file which contains a matrix of numbers. Matrix columns are "tab" > separated, matrix rows are "EOL" seperated. Numbers use coma "," as a > decimal point specifier. > > So the file looks like this: > > 1,234 1,567 1,89 > 2,234 2,567 2,89 > 3,234 3,567 3,89 > > > I know how to do this using Import: > > Import["MyFile.txt", "Table", > ConversionOptions -> {NumberPoint -> ","}] ; > > However, Import is not the function I'd like to use, because it is realy > slow over large files. > > I wonder if someone knows a way to use something faster than Import (I > namely think of ReadList) with coma-numbers? > > >
- References:
- ReadList and NumberPoint ?
- From: sebastien maerten <sebastien.maerten@iota.u-psud.fr>
- ReadList and NumberPoint ?