Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Re: Reading only numbers

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26497] Re: [mg26492] Reading only numbers
  • From: Jean-Marie THOMAS <jmt at agat.net>
  • Date: Thu, 28 Dec 2000 21:31:30 -0500 (EST)
  • References: <200012280752.CAA20036@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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