MathGroup Archive 2001

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

Search the Archive

Re: select data in formatted datafiles


In article <9roe3k$pu0$1 at smc.vnet.net>, "Fabrice Gautheron"
<fabrice.gautheron at cern.ch> wrote:

> Hello,
> 
> I am interested to analyse data from a tab formatted datafile. I need to
> apply a function for one or two column(s) only over a total of 5
> columns. The ReadList command shows the format {data1, data2, data3,
> ...},{data1, data2,...}, ..
> 
> How to request only one or two columns (data2 column or data2 ar data5
> columns for example)?
> 

Fabrice,

To get an array with just the i-th column, transpose your data matrix, 
and then take the i-th entry.

E.g.

Where data is your matrix from ReadList,

column4= Transpose[data][[4]];

-------------------------------------
Carl T. Bergstrom                
Department of Zoology
University of Washington      
Replace nospam with washington to email
http://octavia.zoology.washington.edu            
-------------------------------------


  • Prev by Date: Re: graphics on the same line
  • Next by Date: AW: graphics on the same line
  • Previous by thread: Re: select data in formatted datafiles
  • Next by thread: How big a problem can ConstrainedMax handle?