Re: vector multiplication
- To: mathgroup at smc.vnet.net
- Subject: [mg26123] Re: vector multiplication
- From: Heiko_Petermann at t-online.de (Heiko)
- Date: Tue, 28 Nov 2000 01:56:08 -0500 (EST)
- References: <8rjjdh$ofq@smc.vnet.net> <wTQD5.96470$Zh6.258511@ralph.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hello, i'm using mathematica 3.0 and tried to follow the example but it didn't work for me. Is the Funktion Tr[...]new in version 4 or selfdefined. Thanks for reply. Heiko On Sun, 08 Oct 2000 02:22:20 GMT, "Hans Staugaard" <hans.staugaard at get2net.dk> wrote: >Hello > >First I make a sample matrix: > >In[1]:= >v = Array[Plus, {5, 3}] > >Out[1]= >{{2, 3, 4}, {3, 4, 5}, {4, 5, 6}, {5, 6, 7}, {6, 7, 8}} > >Then pick out the diagonal elements: > >In[2]:= >Tr[Transpose[v].v, List] > >Out[2]= >{90, 135, 190} > > >Hans > ><Yannis.Paraskevopoulos at ubsw.com> wrote in message >news:8rjjdh$ofq at smc.vnet.net... >> Hi there, >> >> Could you please help me with the following: >> >> Assume the v is a vector (1xk). I would like to calculate the v'v and >> then take all the diagonal elements. >> >> Thanks a lot in advance for your effort. >> >> yannis >> >> >> Visit our website at http://www.ubswarburg.com >> >> This message contains confidential information and is intended only >> for the individual named. If you are not the named addressee you >> should not disseminate, distribute or copy this e-mail. Please >> notify the sender immediately by e-mail if you have received this >> e-mail by mistake and delete this e-mail from your system. >> >> E-mail transmission cannot be guaranteed to be secure or error-free >> as information could be intercepted, corrupted, lost, destroyed, >> arrive late or incomplete, or contain viruses. The sender therefore >> does not accept liability for any errors or omissions in the contents >> of this message which arise as a result of e-mail transmission. If >> verification is required please request a hard-copy version. This >> message is provided for informational purposes and should not be >> construed as a solicitation or offer to buy or sell any securities or >> related financial instruments. >> >> > > >