Re: columns
- Subject: [mg2914] Re: columns
- From: groskyd at gv.ssi1.com (David Rosky)
- Date: 9 Jan 1996 04:17:02 -0600
- Approved: usenet@wri.com
- Distribution: local
- Newsgroups: wri.mathgroup
- Organization: Silicon Systems, Inc.
- Sender: mj at wri.com
In <4cqk1p$ig5 at dragonfly.wri.com>, hedden at umich.edu (Julius C Hedden) writes: > >I have a simple problem that I can't seem to find a solution to. I have a >datafile that consists of a matrix of 3 columns which I want to import >into Mathematica. All I can find in Wolfram's book is the command >ReadList, which reads in the file starting with element 1 of column 1 and >moves to element 1 of column 2, and so on. When RecordLists is set to >True, it will organize the file into a set of sublists which correspond >to the rows of the matrix. I want sublists that correspond to the >columns. Can anyone please tell me how to get a columnar organization? > > It's not very elegant, but what I do in these cases is simply transpose the matrix as you read it in: m = Transpose[ReadList[...]]; Regards, David Rosky (groskyd at gv.ssi1.com)