Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1997
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

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

Search the Archive

Re: Something like Flatten

  • To: mathgroup at smc.vnet.net
  • Subject: [mg8600] Re: Something like Flatten
  • From: "Dr Stephen P Luttrell" <luttrell at signal.dra.hmg.gb>
  • Date: Tue, 9 Sep 1997 03:07:16 -0400
  • Organization: Defence Research Agency
  • Sender: owner-wri-mathgroup at wolfram.com

Hans Steffani <hans.steffani at e-technik.tu-chemnitz.de> wrote in article
<5ut4bp$9oa at smc.vnet.net>...
> I have a list of list of (list of one number). How can I get a 
> list of list of numbers? Flatten does not work as the outer but
> not the inner braces are deleted.

Try using Sequence. Here is an example:

The following input:

{Table[{Random[]},{10}]}

Apply[Sequence,%,{2}]

produces the following output:

{{{0.878597},{0.571909},{0.926708},{0.472633},{0.891825},{0.550448},{
      0.820702},{0.694014},{0.313082},{0.0863603}}}

{{0.878597,0.571909,0.926708,0.472633,0.891825,0.550448,0.820702,0.694014,
    0.313082,0.0863603}}

-- 
Dr Stephen P Luttrell                  luttrell at signal.dra.hmg.gb
Adaptive Systems Theory                01684-894046 (phone)
Room EX21, Defence Research Agency     01684-894384 (fax)           
Malvern, Worcs, WR14 3PS, U.K.        
http://www.dra.hmg.gb/cis5pip/Welcome.html



  • Prev by Date: Re: Combining Lists?
  • Next by Date: Re: MeijerG special function
  • Previous by thread: Re: Something like Flatten
  • Next by thread: Re: Something like Flatten