tr | R Documentation |
Sum of diagonal elements of a matrix.
tr(x)
x |
A matrix. |
The sum of the diagonal elements of x
.
tr(ones(5, 10))
x <- replicate(1000, tr(rand(25, 25)))
hist(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.