Re: How to create {{x1,y1}, ..., {xn,yn}} data from {x1,...,xn} and {y1, ..., yn}
- To: mathgroup at smc.vnet.net
- Subject: [mg63799] Re: [mg63755] How to create {{x1,y1}, ..., {xn,yn}} data from {x1,...,xn} and {y1, ..., yn}
- From: Clifford Martin <camartin at snet.net>
- Date: Sat, 14 Jan 2006 02:33:16 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Hi, For example: varx= { x1,x2,x3,x4} yvar= { y1,y2,y3,y4} usvar= Transpose[ { varx,yvar}] {x1, x2, x3, x4} {y1, y2, y3, y4} {{x1, y1}, {x2, y2}, {x3, y3}, {x4, y4}} Does this answer your question? As far as compound statements in a function just use parentheses around the compound statements for example. dffunc := (first statement; second statement; third statement;) Good luck, Cliff "youngjin.michael at gmail.com" <youngjin.michael at gmail.com> wrote: Hello, 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}. I also would like to know if a user-defined function in Mathematica can have more than one statements in its body. Thanks in advance. Young-Jin