Re: Removing brakets of a list
- To: mathgroup at smc.vnet.net
- Subject: [mg48303] Re: [mg48288] Removing brakets of a list
- From: Hugh Walker <hwalker at gvtc.com>
- Date: Sat, 22 May 2004 03:04:36 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On Friday, May 21, 2004, at 02:54 AM, Sebastian Cohen S wrote:
> Hello everyone in the group,
>
> I need to know a way to remove the outer brakets that encapsulate a
> list generated by the Table function.
>
> i.e:
>
> Flatten[Table[Subscript[x, i, j],
> {i, 1, 4}, {j, 1, 4}]]
>
> Generates:
>
> {Subscript[x, 1, 1], Subscript[x, 1, 2], <<12>> Subscript[x, 4, 3],
> Subscript[x, 4, 4]}
>
> And I need a function that flattens the output completely removing the
> outer brakets like giving the following as an output:
>
> Subscript[x, 1, 1], Subscript[x, 1, 2], <<12>> Subscript[x, 4, 3],
> Subscript[x, 4, 4]
>
> Has anyone done it? or know how to do it?
>
> Thanks in advance for any help you may provide,
>
> Sebastian Cohen S
Is this what you want to do?
xList = Flatten[Table[Subscript[x, i, j], {i, 1, 4}, {j, 1, 4}]];
f[xList /. List -> Sequence]
==========
Hugh Walker
Gnarly Oaks