MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: reading data files


In a message dated 12/9/01 7:24:05 AM, christophe.leponcin-lafitte at obspm.fr 
writes:

>I want to realize an input file for a Mathematica program, which has the
>form :
>-------
>datafile1="toto.dat"
>
>datafile2="toto2.dat"
>
>parameter1=10
>
>parameter2=0.05
>-----
>For this time, I use an input file like :
>-----
>"toto.dat"
>"toto2.dat"
>10
>0.05
>-----
>In reality, the input file contains 35 data files, and 92 parameters.
>But, when a person want to read or modify the input file, he doesn't 
>know which parameter he changes ! This is only a list of number and 
>string !
>
>So, how to import in Mathematica the lign, datafile1="toto.dat" or 
>parameter1=10, and keep only the information "toto.dat" or 10 in a 
>variable of the main program.
>

Clear[datafile1, datafile2, parameter1, parameter2];

ToExpression /@ ReadList["Macintosh HD:Documents:temp:datafile.txt", String];

{datafile1, datafile2, parameter1, parameter2}

{toto.dat,toto2.dat,10,0.05}


Bob Hanlon
Chantilly, VA  USA


  • Prev by Date: Re: I Need advice on converting Mathematica files to JPEGS or Bitmaps
  • Next by Date: Re: Simple questions about Mathematica
  • Previous by thread: reading data files
  • Next by thread: Mathematica tensor product