Re: Creating Matrix from vectors
- To: mathgroup at smc.vnet.net
- Subject: [mg100735] Re: [mg100691] Creating Matrix from vectors
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Thu, 11 Jun 2009 21:46:03 -0400 (EDT)
- Reply-to: hanlonr at cox.net
Use Transpose a = Array[s, {3, 5}] {{s[1, 1], s[1, 2], s[1, 3], s[1, 4], s[1, 5]}, {s[2, 1], s[2, 2], s[2, 3], s[2, 4], s[2, 5]}, {s[3, 1], s[3, 2], s[3, 3], s[3, 4], s[3, 5]}} Transpose[a] {{s[1, 1], s[2, 1], s[3, 1]}, {s[1, 2], s[2, 2], s[3, 2]}, {s[1, 3], s[2, 3], s[3, 3]}, {s[1, 4], s[2, 4], s[3, 4]}, {s[1, 5], s[2, 5], s[3, 5]}} Bob Hanlon ---- Kinu <basukinjal at gmail.com> wrote: ============= Suppose i have a n number of vectors say s1, s2,... sn. I want to create a matrix such that these n vectors are the n columns of the matrix. I tried using A = {s1,s2,..,sn}; however this keep the vectors intact and stacks them one below the other. How can i make a matrix from these?? Can anyone please help me with this.