tr {matrixNormal} | R Documentation |
Matrix Trace
Description
Computes the trace of a square numeric matrix A.
Usage
tr(A)
Arguments
A |
Square matrix. |
Note
If the argument is not a square numeric matrix, the function presents an error and terminates.
See Also
Other matrix:
special.matrix
,
vec()
Examples
A <- matrix(seq(1, 16, 1), nrow = 4, byrow = TRUE)
A
tr(A)
tr(I(3))
[Package matrixNormal version 0.1.1 Index]