Re: Combining Lists?

*To*: mathgroup at smc.vnet.net*Subject*: [mg8603] Re: Combining Lists?*From*: "Dr Stephen P Luttrell" <luttrell at signal.dra.hmg.gb>*Date*: Tue, 9 Sep 1997 03:07:18 -0400*Organization*: Defence Research Agency*Sender*: owner-wri-mathgroup at wolfram.com

Alan Hunter <akh6n at virginia.edu> wrote in article <5ut8r0$a50 at smc.vnet.net>... > I think this is a pretty easy question so I hope someone will be able > to answer it, I just can't figure out how to do it. If you have two > lists, for example {1, 2, 3} and {4, 5, 6}. Is there a command to > combine them into a series of XY pairs like {{1, 4}, {2, 5}, {3, 6}}? > The book doesn't seem to have such a command, but I suspect one exists. Transpose[{{1, 2, 3} ,{4, 5, 6}}] produces the output {{1,4},{2,5},{3,6}} -- 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