trace(x), x a REAL square matrix

trace(x) computes the so-called trace of REAL square matrix x, that is, sum(diag(x)) = x[1,1]+x[2,2]+...+x[k,k], when x is k by k.. See also topics 'matrices', dmat(), diag(), det().