Learn R Programming

infoDecompuTE (version 0.6.2)

tr: Trace of the Matrix

Description

Compute the trace of the square matrix.

Usage

tr(X)

Arguments

X

a square matrix.

Value

A numeric value.

References

John J, Williams E (1987). Cyclic and computer generated Designs. Second edition. Chapman & Hall.

See Also

diag

Examples

Run this code
# NOT RUN {

m = matrix(1, nrow = 10, ncol = 10)
tr(m)   


# }

Run the code above in your browser using DataLab