Re: Vector transpose!
- To: mathgroup at smc.vnet.net
- Subject: [mg84474] Re: Vector transpose!
- From: Bill Rowe <readnewsciv at sbcglobal.net>
- Date: Wed, 26 Dec 2007 05:13:51 -0500 (EST)
On 12/25/07 at 6:29 AM, markmgg at googlemail.com (mark) wrote: >How to take the transpose of a column vector. In other words, I have >a vector of 4 elements ( r={a,b,c,cd} ) and a 4x4 matrix M. I need >to do apply this operation: Transpose[r].M.r Here are a couple of ways after creating some data: m = Table[RandomReal[], {4}, {4}]; r = RandomReal[1, 4]; In[15]:= {r}.m.r Out[15]= {3.99232} or In[16]:= g = List /@ r; Transpose[g].m.g Out[17]= {{3.99232}} Note, while the computed value is the same for both, these are not truly equivalent as the first outputs a 1 element long vector and the second outputs a 1x1 matrix -- To reply via email subtract one hundred and four