tr {lazy.symbolic} | R Documentation |
trace of the input matrix
tr(A)
A |
Input square matrix or scalar |
Can be used with a character matrix.
trace of A
tr(demomat(2,2))
# Semi Symbolic Partitioned Matrix: Super Matrix with SMdim attributes
A=demomat(c(2,3),c(2,3),root="a")
Printb(A)
tr(A)
# Fully Symbolic Partitioned Matrix: No SMdim attribute but
# fullsymb attribute
Ap=demomat(2,2,root="A", fullsymb=1)
Printb(Ap)
tr(Ap)