tr | R Documentation |
tr
computes the trace of a matrix.
tr(X)
X |
a (square) matrix |
the trace (a scalar)
Jan Graffelman (jan.graffelman@upc.edu)
X <- matrix(runif(25),ncol=5)
print(X)
print(tr(X))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.