Re: {x},{y} -> {x,y} ?
- To: mathgroup at smc.vnet.net
- Subject: [mg68281] Re: {x},{y} -> {x,y} ?
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Mon, 31 Jul 2006 03:45:50 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <eaht5b$or5$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
AngleWyrm wrote: > Hi, > I have two lists, a set of x values and a set of y values. How do I convert > them to one list of { {x1,y1},{x2,y2} } pairs? > > Use *Transpose* [1]. x = {a, b, c}; y = {1, 2, 3}; Transpose[{x, y}] returns {{a, 1}, {b, 2}, {c, 3}} HTH, Jean-Marc [1] http://documents.wolfram.com/mathematica/functions/Transpose