Back to Linear Algebra (Eigen)
eigen.dense.trace
Compute the trace of a matrix (sum of diagonal elements).
Syntax
eigen.dense.trace(A)
Description
Compute the trace of a matrix (sum of diagonal elements).
Parameters
| Name | Description |
|---|---|
| A | - Matrix (typically square) |
Returns
number