powered by
tr(X)
diag
m = matrix(1, nrow = 10, ncol = 10) tr(m)
Run the code above in your browser using DataLab