Re: No trace of trace!
- To: mathgroup at smc.vnet.net
- Subject: [mg15190] Re: No trace of trace!
- From: "Albert Maydeu-Olivares" <amaydeu at nil.fut.es>
- Date: Fri, 18 Dec 1998 02:11:06 -0500
- Organization: University of Barcelona
- References: <754ulc$je8@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Here are a few useful matrix functions, including the trace you asked
for
Diag[matrix_List]:=
Table[If[i==j,matrix\[LeftDoubleBracket]i,j\[RightDoubleBracket],0],{i,
L[matrix]},{j,L[matrix]}]
VecLow[matrix_List]:=Flatten[MapIndexed[Take[#1,First[#2]-1]&,matrix]]
VecLowDiag[matrix_List]:=Flatten[MapIndexed[Take[#1,First[#2]]&,matrix]]
VecDiag[matrix_List]:=Table[matrix[[i,i]], {i,Length[matrix]}]
Tr[matrix_List]:=Plus@@VecDiag[matrix] --
Albert Maydeu-Olivares Tel. +34 3 4021079 ext. 3099 Faculty of
Psychology Fax. +34 3 4021362 University of Barcelona E-Mail:
amaydeu at tinet.fut.es Passeig de la Vall d'Hebron, 171.
08035 - Barcelona (Spain)
Peter Jay Salzman <psalzman at landau.ucdavis.edu> escribió en artículo
<754ulc$je8 at smc.vnet.net>...
>
>
> After looking for close to 5 minutes, I've concluded that the Trace
> *matrix* operation is either not present or well hidden.
>
> Can someone tell me which one?
>
> Pete
>