Re: select data in formatted datafiles
- To: mathgroup at smc.vnet.net
- Subject: [mg31394] Re: select data in formatted datafiles
- From: "Carl T. Bergstrom" <cbergst at u.nospam.edu>
- Date: Wed, 31 Oct 2001 19:59:17 -0500 (EST)
- References: <9roe3k$pu0$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
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
-------------------------------------