MathGroup Archive 2008

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

Search the Archive

Re: Reading numerical data from a file which also contains a text data

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92809] Re: Reading numerical data from a file which also contains a text data
  • From: "Frank Richter" <Frank.Richter at ruhr-uni-bochum.de>
  • Date: Tue, 14 Oct 2008 04:55:06 -0400 (EDT)
  • References: <gcv7lj$e69$1@smc.vnet.net>

try
Skip[snum,String,3]
instead of FindList

"Toshiyuki (Toshi) Meshii" <tmeshii at gmail.com> schrieb im Newsbeitrag 
news:gcv7lj$e69$1 at smc.vnet.net...
> Hello.
>
> I want to read numerical data from an output file, which also contains
> text data.
>
> The file test.t19 is as follows:
>
> id
> 1
> =beg=50800 (Nodal Coordinates)
>            1 0.000000E+00 0.000000E+00
>            2 0.150000E+01 0.000000E+00
>            3 0.150000E+01 0.150000E+01
>            4 0.000000E+00 0.150000E+01
>
> I want to read the coordinates of nodes 1~4.
>
> So what I did is as follows:
>
> snum = OpenRead["test.t19"]
> FindList[snum, "Coordinates"]
> ReadList[snum, Number, RecordLists -> True]
>
> The result was
> {{0}}
>
> ,though I expected
> {{1,0.000000E+00,0.000000E+00},{2,0.150000E+01,0.000000E+00},{3,
> 0.150000E+01,0.150000E+01},{4,0.000000E+00,0.150000E+01}}
>
> I thought that the pointer would move to the next line of the line
> including the word "Coordinates."
>
> Can some one help me on my problem?
>
> -Toshi
>
> 




  • Prev by Date: Re: Exclude O[] from Series[] for Solve[] in Mathematica
  • Next by Date: Re: naive question
  • Previous by thread: Reading numerical data from a file which also contains a text data
  • Next by thread: Re: time based moving average (and other newbie mathematica