home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 2.ddi / MATFUN.DI$ / TRACE.M < prev   
Encoding:
Text File  |  1993-03-07  |  233 b   |  9 lines

  1. function t = trace(a)
  2. %TRACE    Sum of diagonal elements.
  3. %    TRACE(A) is the sum of the diagnonal elements of A, which is
  4. %    also the sum of the eigenvalues of A.
  5.  
  6. %    Copyright (c) 1984-93 by The MathWorks, Inc.
  7.  
  8. t = sum(diag(a));
  9.