Learn R Programming

ThreeWay (version 1.1.4)

tr: Trace

Description

Computes the trace of a matrix.

Usage

tr(a)

Value

t

Trace of A

Arguments

a

Matrix

Author

Maria Antonietta Del Ferraro mariaantonietta.delferraro@yahoo.it
Henk A.L. Kiers h.a.l.kiers@rug.nl
Paolo Giordani paolo.giordani@uniroma1.it

Examples

Run this code
X <- matrix(rnorm(6*6),ncol=6)
trace <- tr(X)

Run the code above in your browser using DataLab