|
Trace
Return the sum along diagonals of the matrix.
double matrix::Trace() |
Return Value
The sum along the diagonal.
Note
The trace of a matrix is equal to the sum of its eigenvalues.
MQL5 example:
matrix a= {{0, 1, 2, 3, 4, 5, 6, 7, 8}};
|
Python example:
a = np.arange(9).reshape((3,3))
|