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