Re: How to create {{x1,y1}, ..., {xn,yn}} data from{x1,...,xn} and {y1, ..., yn}
- To: mathgroup at smc.vnet.net
- Subject: [mg63804] Re: [mg63755] How to create {{x1,y1}, ..., {xn,yn}} data from{x1,...,xn} and {y1, ..., yn}
- From: "David Annetts" <davidannetts at aapt.net.au>
- Date: Sat, 14 Jan 2006 02:33:45 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Hi Young-Jin, > I would like to know how to create a table format data such > as {{x1, y1}, {x2, y2}, ..., {xn, yn}} from {x1, x2, ..., xn} > and {y1, y2, ..., yn}. Did you even try Transpose? tbl = # & /@ Range[4]; tbl = {tbl, tbl} trn = Transpose[tbl] > I also would like to know if a user-defined function in > Mathematica can have more than one statements in its body. Yes it can. There are more than enough examples in the online help and also in this newlist to get you started. Regards, Dave.