MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: No trace of trace!


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
> 



  • Prev by Date: Re: Linearization
  • Next by Date: Re: rician random number
  • Previous by thread: Re: No trace of trace!
  • Next by thread: package loading