powered by
tr computes the trace of a matrix.
tr
tr(X)
the trace (a scalar)
a (square) matrix
Jan Graffelman (jan.graffelman@upc.edu)
X <- matrix(runif(25),ncol=5) print(X) print(tr(X))
Run the code above in your browser using DataLab