h_tr: Trace of a Matrix

View source: R/utils.R

h_trR Documentation

Trace of a Matrix

Description

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

Usage

h_tr(x)

Arguments

x

(matrix)
square matrix input.

Value

The trace of the square matrix.


mmrm documentation built on Oct. 7, 2024, 1:14 a.m.