Re: combine two vectors to form matrix
- To: mathgroup@smc.vnet.net
- Subject: [mg11274] Re: [mg11222] combine two vectors to form matrix
- From: Sean Ross <seanross@worldnet.att.net>
- Date: Wed, 4 Mar 1998 01:39:29 -0500
- References: <199803030411.XAA02267@smc.vnet.net.>
s2700114@nickel.laurentian.ca wrote: > > could any one tell me how to combine two lists(column vectors) into an n > x 2 matrix? > > Troy {Flatten[vector1],Flatten[vector2]}. by the way, lists in mathematica are, by default ROW vectors, not column vectors. so a 1-D ROW vector looks like: {1,2,3,4,5,6} while a 1-D COLUMN vector looks like {{1},{2},{3},{4},{5},{6}} If, after this explanation, you decide that your lists were really ROW vectors after all, then use: {vector1,vector2}. "Tour of mathematica" section on the mathematica book or on-line help. Without a basic knowledge of syntax and data structures, you are really crippled in your abibility to use any programming language, mathematica included. -- Remove the _nospam_ in the return address to respond.
- References:
- combine two vectors to form matrix
- From: s2700114@nickel.laurentian.ca
- combine two vectors to form matrix