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: [mg8586] Re: [mg8541] Something like Flatten
  • From: BobHanlon at aol.com
  • Date: Sun, 7 Sep 1997 22:13:06 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

If I understand your intent, the last expression is what you want:

theList = { {{1}, {2}, {3}}, {{4}, {5}, {6}}, {{7}, {8}, {9}} };

Flatten[theList]

{1,2,3,4,5,6,7,8,9}

Flatten[theList, 1]

{{1},{2},{3},{4},{5},{6},{7},{8},{9}}

Map[Flatten, theList]

{{1,2,3},{4,5,6},{7,8,9}}


Bob Hanlon


  • Prev by Date: Re: Integer Values
  • Next by Date: Re: Combining Lists?
  • Previous by thread: Something like Flatten
  • Next by thread: Re: Something like Flatten