MathGroup Archive 1999

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

Search the Archive

Re: Reading data.

  • To: mathgroup at
  • Subject: [mg21151] Re: Reading data.
  • From: Bojan Bistrovic <bojanb at>
  • Date: Fri, 17 Dec 1999 01:22:02 -0500 (EST)
  • Organization: Old Dominion Universityaruba
  • References: <831v6a$>
  • Sender: owner-wri-mathgroup at

Madhusudan Singh wrote:
> I have a data file with 7 columns and 100 rows. How do I import data from
> that into 7 different arrays in Mathematica ? The data is in exponential
> form and is tab separated. Top few rows are shown at the end of this
> posting.
> -------------
> The cut and paste has junked up the things a bit. But there are 7 columns
> and 100 or so rows.
> -----------
> Second question : how do I do a linear fit of of one column as x and
> another as y ?
> What is the format of such an output ?
Lets asume the data are in the file called "filename". You do the

In[1]:= f1=OpenRead["filename"];
In[3]:= table2=Transpose[table1]

and you'll get a table with 7 elements, each a table with 100 elements
coresponding to the columns in your file. This assumes that the
"filename" is in a place where mathematica can find it.

Bojan Bistrovic,                       bojanb at  
Old Dominion University, Physics Department,      Norfolk, VA

  • Prev by Date: Re: 2 coupled diff. eqns
  • Next by Date: Re: (Newbie) Applying colors to surface plots
  • Previous by thread: Reading data.
  • Next by thread: Re: Reading data.