Main Content
diag
Create diagonal matrix or get diagonals from symbolic matrices
Description
Examples
Input Arguments
Tips
The
trace
of a matrix is equal tosum(diag(A))
.
Version History
Introduced before R2006a
Create diagonal matrix or get diagonals from symbolic matrices
The trace
of a matrix is equal to
sum(diag(A))
.
Introduced before R2006a