MathGroup Archive 1997

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

Search the Archive

Re: Noah's List

  • To: mathgroup at smc.vnet.net
  • Subject: [mg5701] Re: Noah's List
  • From: rhall2 at umbc.edu (hall robert)
  • Date: Sat, 11 Jan 1997 14:29:02 -0500
  • Organization: University of Maryland, Baltimore County
  • Sender: owner-wri-mathgroup at wolfram.com

In article <5atsld$ssn at dragonfly.wolfram.com>,
Hans Havermann  <haha at astral.magic.ca> wrote:
>
>
>I have two lists, x and y, each containing n elements. I would like to
>generate a new list, {{x[[1]],y[[1]]}, {x[[2]],y[[2]]},...
>{x[[n]],y[[n]]}}, but have been unable to figure out a shorthand for it.
>Any help would be much appreciated.

Transpose[]
In[12]:=
   xlist = Array[x, 5]
   ylist = Array[y, 5]
   Transpose[{xlist, ylist}]
Out[12]=
   {x[1], x[2], x[3], x[4], x[5]}
Out[13]=
   {y[1], y[2], y[3], y[4], y[5]}
Out[14]=
   {{x[1], y[1]}, {x[2], y[2]}, {x[3], y[3]}, {x[4], y[4]}, {x[5], y[5]}}

-- 
Bob Hall            | "Know thyself? Absurd direction!
rhall2 at gl.umbc.edu  |  Bubbles bear no introspection."  -Khushhal Khan Khatak


  • Prev by Date: FS: Optica + Mathematica for Mac
  • Next by Date: Error in HypergeometricPFQ-package?
  • Previous by thread: Re: Noah's List
  • Next by thread: Re: Noah's List