trace
Matrix trace.
Syntax
res = trace(x)
Input argument
x - a numeric value: scalar or matrix (double or single)
Output argument
res - a numeric value: a scalar
Description
trace(x) computes the trace of x, the sum of the elements along the main diagonal.
Example
See also
eig.
History
Version | Description |
---|---|
1.0.0 | initial version |
Author
Allan CORNET
Last updated