trace
Sum of diagonal elements
Syntax
Description
Examples
Input Arguments
Algorithms
trace extracts the diagonal elements and adds them together with the
command sum(diag(A)). The value of the trace is the same (up to round-off
error) as the sum of the matrix eigenvalues sum(eig(A)).
Extended Capabilities
Version History
Introduced before R2006a