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: [mg26496] RE: [mg26492] Reading only numbers
  • From: "Krautschik, Chris G" <krautschikc at intel.co.jp>
  • Date: Thu, 28 Dec 2000 21:31:30 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Jonhee,

Let's say the file is an ASCII file named "coil.txt";

You can import it in the following way that reads in the header plus the
numbers:

dat = Import["coil.txt", "Table"];

This shows each line of text from which you can see that you only want rows
6 through 11.
dat//MatrixForm

Assign the list of data to dat2:
dat2=dat[[ Range[6, 11] ]]

This shows the results of dat2:
{{1, 1.5}, {3}, {10, 3}, {7}, {50, 11}, {66}}

Now you can access particular values through the various indeces of dat2;

Regards,
Chris


-----Original Message-----
From: Jonghee Lee [mailto:jonghee at glue.umd.edu]
To: mathgroup at smc.vnet.net
Subject: [mg26496] [mg26492] Reading only numbers


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: FW: Symbolic Fourier Transform
  • Next by Date: Re: Can I make this shape?
  • Previous by thread: Re: Reading only numbers
  • Next by thread: NEED HELP! Mathematica seems to "forget" that a package has been loaded