Maxima Function
tracematrix (M)
Returns the trace (sum of the diagonal elements) of matrix M.
To use this function write first load(functs).
load(functs)