Re: tablename[[x]]= xth row, how to get xth column
- To: mathgroup at smc.vnet.net
- Subject: [mg88619] Re: [mg88586] tablename[[x]]= xth row, how to get xth column
- From: János <janos.lobb at yale.edu>
- Date: Sat, 10 May 2008 06:51:22 -0400 (EDT)
- References: <200805090724.DAA16608@smc.vnet.net>
On May 9, 2008, at 3:24 AM, cimon wrote:
> hello
>
> a very simple question, "sometablename[[X]]" gives me the Xth row of
> table , like below.
>
> f = {{1, 2, 3, 4}, {1, 4, 6, 77}}
> {{1, 2, 3, 4}, {1, 4, 6, 77}}
> f[[1]]
> {1, 2, 3, 4}
>
>
> I am not able to find the syntax that can give me Xth column of a
> table. i dont want to transpose it and use. and I tried #,
>
> thank you
>
> cimon
As a newbie I would go for, let's say the 3rd column, with:
In[4]:=
f[[All,3]]
Out[4]=
{3, 6}
- References:
- tablename[[x]]= xth row, how to get xth column
- From: cimon <tamanna.arora@gmail.com>
- tablename[[x]]= xth row, how to get xth column