MathGroup Archive 2002

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

Search the Archive

RE: more elements in a list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg32268] RE: [mg32241] more elements in a list
  • From: "Harvey P. Dale" <hpd1 at nyu.edu>
  • Date: Wed, 9 Jan 2002 23:37:25 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Merkat:
	Flatten[Table[#[[1]],{#[[2]]}]&/@Transpose[{{a,b,c},{2,5,4}}]]
	Best,
	Harvey
Harvey P. Dale
New York University School of Law
Room 206A
110 West 3rd Street
New York, N.Y. 10012-1074


-----Original Message-----
From: merkat [mailto:cabanc at hotmail.com] 
To: mathgroup at smc.vnet.net
Subject: [mg32268] [mg32241] more elements in a list

Hi ,

How do I multiply the number of elements in a list?
I have the lists:
{a,b,c}  and
{2,5,4}

the result should be:
{a,a,b,b,b,b,b,c,c,c,c}

Merkat

This email has been scanned for all viruses by the MessageLabs SkyScan service. For more information on a pro-active anti-virus service working around the clock, around the globe visit http://www.messagelabs.com/


  • Prev by Date: Re: more elements in a list
  • Next by Date: Re: more elements in a list
  • Previous by thread: Re: more elements in a list
  • Next by thread: Re: more elements in a list