Student Support Forum: '2-D vector from 2 1-D vectors' topicStudent Support Forum > General > "2-D vector from 2 1-D vectors"

 < Previous Comment Help | Reply To Comment | Reply To Topic
 Author Comment/Response John Leko 09/16/00 08:38am >How do you make a two dimensional vector from two one dimensional vectors. Say vector A ={x1,...,xn} and B = {y1,...,yn} and I want to make a vector C = {[x1,y1],...,[xn,yn]}. Any help would be greatly appreciated. First of all, I am assuming that what you want, in Mathematica parlance, is {{x1, y1}, {x2, y2}, ...{xn, yn}}, not ''{[x1,y1],...,[xn,yn]}''. First, I need to create two vectors: In[4]:= a = Table[i, {i, 5}] b = Table[j + 5, {j, 5}] Out[4]= {1, 2, 3, 4, 5} Out[5]= {6, 7, 8, 9, 10} Now, to reconfigure these I do the following: In[6]:= Transpose[{a, b}] Out[6]= {{1, 6}, {2, 7}, {3, 8}, {4, 9}, {5, 10}} URL: ,

 Subject (listing for '2-D vector from 2 1-D vectors') Author Date Posted 2-D vector from 2 1-D vectors Mike Alessi 09/15/00 09:05am Re: 2-D vector from 2 1-D vectors Aaron Honecker 09/16/00 08:37am Re: 2-D vector from 2 1-D vectors John Leko 09/16/00 08:38am
 < Previous Comment Help | Reply To Comment | Reply To Topic