Command Reference : Matrix Language Reference
  
 
@trace
Syntax: @trace(m)
Argument: matrix or sym, m
Return: scalar
Returns the trace (the sum of the diagonal elements) of a square matrix or sym, m. Example:
scalar sc1 = @trace(m1)