Re: Output Table Format Change
- To: mathgroup at smc.vnet.net
- Subject: [mg66726] Re: Output Table Format Change
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Sat, 27 May 2006 21:03:54 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <e56dqn$1rv$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Narasimham wrote:
> Is there a command for removal of brackets automatically from
> output ?
>
> tbl = Table[ N[ {Sin[u+v],Cos[u-v]}],{u,0, Pi,Pi/6},{v,0, Pi,Pi/6}] ;
>
> ListPlot[tb,PlotJoined->True,AspectRatio->Automatic];
>
> tb is same as tbl from which extra curly brackets { } are manually
> removed. (tbl output is deleted here).
>
> Thanks in advance.
>
Hi,
Use the built-in function *Flatten* [1] with its second argument set to
1. For instance,
tbl = Table[N[{Sin[u + v], Cos[u - v]}],
{u, 0, Pi, Pi/6}, {v, 0, Pi, Pi/6}];
ListPlot[Flatten[tbl, 1], PlotJoined -> True,
AspectRatio -> Automatic];
Best regards,
Jean-Marc
[1] http://documents.wolfram.com/mathematica/functions/Flatten