MATLAB Function Reference | Search  Help Desk |
trace | See Also |
b = trace(A)
b = trace(A)
is the sum of the diagonal elements of the matrix A
.
trace
is a single-statement M-file.
t = sum(diag(A));
det
Matrix determinant
eig
Eigenvalues and eigenvectors