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