Re: Re: vector multiplication
- To: mathgroup at smc.vnet.net
- Subject: [mg26170] Re: [mg26123] Re: vector multiplication
- From: BobHanlon at aol.com
- Date: Thu, 30 Nov 2000 01:04:12 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Direct support for matrix trace is new to V4. However, you can easily implement: mat = Array[a, {5, 5}]; tr[mat_] := Module[{i}, Sum[mat[[i, i]], {i, Length[mat]}]] Tr[mat] == tr[mat] True Bob Hanlon In a message dated 11/28/00 3:31:26 AM, Heiko_Petermann at t-online.de writes: >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. >