Learn R Programming

mmrm (version 0.3.14)

h_tr: Trace of a Matrix

Description

Obtain the trace of a matrix if the matrix is diagonal, otherwise raise an error.

Usage

h_tr(x)

Value

The trace of the square matrix.

Arguments

x

(matrix)
square matrix input.