Trace {GraphAlignment}R Documentation

Calculate trace of a matrix

Description

Calculate the trace of a square matrix.

Usage

Trace(m)

Arguments

m square matrix

Details

The return value is the trace of the input matrix.

Author(s)

Joern P. Meier, Michal Kolar, Ville Mustonen, Michael Laessig, and Johannes Berg

Examples

  m <- matrix(c(1, 0, 0, 1), 2, 2)
  Trace(m)

[Package GraphAlignment version 1.4.0 Index]