tr

0th

Percentile

Trace of a Matrix

Calculates the trace of a matrix

Keywords
math
Usage
tr(mat)
Value

The trace of the matrix, i.e. the sum of its diagonal elements, is returned.

Aliases
Examples
tr(cbind(1,1:3,4:2)) # 5
Documentation reproduced from package lasso2, version 1.2-9, License: GPL version 2 or later

Community examples

Looks like there are no examples yet.