MathGroup Archive 2000

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

Search the Archive

Re: Reading only numbers


Try reading your file using StringToStream :

I suppose this is the file :

!! "data"

*  Frequency Respose of S.C. Coil *

frequency(Hz)                    input voltage(mV)
output voltage(V)
-------------------------------------------------------------------
1                                          1.5
3
10                                         3
7
50                                         11
66


s = StringToStream@
    First at ReadList["data", Record, 
        RecordSeparators -> {}]

Read[s, Record, RecordSeparators -> "\n"]

"*  Frequency Respose of S.C. Coil *"

Read[s, Record, RecordSeparators -> "\n"]

"frequency(Hz)                    input voltage(mV)"

Read[s, Record, RecordSeparators -> "\n"]

"output voltage(V)"

Read[s, Record, RecordSeparators -> "\n"]

"-------------------------------------------------------------------"

Read[s, Table[Number, {3}, {3}]]

{{1, 1.5, 3}, {10, 3, 7}, {50, 11, 66}}

Close at s;


On Thursday 28 December 2000 08:52, Jonghee Lee wrote:
In case that I have a data file which has contents as following,



*  Frequency Respose of S.C. Coil *

frequency(Hz)                    input voltage(mV)
output voltage(V)
-------------------------------------------------------------------
1                                          1.5
3
10                                         3
7
50                                         11
66


  • Prev by Date: Re: NEED HELP! Mathematica seems to "forget" that a package has been loaded
  • Next by Date: Transparent Layering w/ Solids
  • Previous by thread: Reading only numbers
  • Next by thread: RE: Reading only numbers