MATLAB Functions Help Desk

trace

Purpose

Sum of diagonal elements

Syntax

Description

b = trace(A) is the sum of the diagonal elements of the matrix A.

Algorithm

trace is a single-statement M-file.

See Also

det         Matrix determinant

eig         Eigenvalues and eigenvectors



[ Previous | Help Desk | Next ]