Re: plotting vectors

*To*: mathgroup at smc.vnet.net*Subject*: [mg83891] Re: plotting vectors*From*: Szabolcs Horvát <szhorvat at gmail.com>*Date*: Mon, 3 Dec 2007 07:12:54 -0500 (EST)*References*: <fj0n02$ir9$1@smc.vnet.net>

fcs04001 wrote: > Suppose that I have two vectors x and y, each with 72 elements. I want to plot them, but not have to type {x1,y1},{x2,y2},...etc for all 72 pairs. Is there an easy way to do that? I know that in another system this is pretty easy, but am having difficulty with Mathematica to perform that. > Thanks. > Is this what you're looking for? In[1]:= x = Range[10] Out[1]= {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} In[2]:= y = x^2 Out[2]= {1, 4, 9, 16, 25, 36, 49, 64, 81, 100} In[3]:= Transpose[{x, y}] Out[3]= {{1, 1}, {2, 4}, {3, 9}, {4, 16}, {5, 25}, {6, 36}, {7, 49}, {8, 64}, {9, 81}, {10, 100}} -- Szabolcs