MathGroup Archive 1996

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

Search the Archive

Re: columns

  • To: mathgroup at smc.vnet.net
  • Subject: [mg2914] Re: columns
  • From: groskyd at gv.ssi1.com (David Rosky)
  • Date: Tue, 9 Jan 1996 02:19:16 -0500
  • Organization: Silicon Systems, Inc.

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)



==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Re: Part
  • Next by Date: Re: Part
  • Previous by thread: columns
  • Next by thread: Re: columns