tr: Trace operator

trR Documentation

Trace operator

Description

Calculates the trace of a square matrix.

Usage

tr(x, ...)

Arguments

x

Square numeric matrix

...

Additional arguments to lower level functions

Value

numeric

Author(s)

Klaus K. Holst

See Also

crossprod, tcrossprod

Examples


tr(diag(1:5))

lava documentation built on May 29, 2024, 3:10 a.m.