This is a static copy of a profile report

Home

Function details for traceThis is a static copy of a profile report

Home

trace (Calls: 2809422, Time: 7.851 s)
Generated 20-Jul-2018 02:24:59 using performance time.
function in file C:\Program Files\MATLAB\R2018a\toolbox\matlab\matfun\trace.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
run_admmfunction2809422
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
14
t = full(sum(diag(A)));
28094223.359 s42.8%
11
if ~ismatrix(A) || size(A,1)~=...
28094220.169 s2.2%
All other lines  4.323 s55.1%
Totals  7.851 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function14
Non-code lines (comments, blank lines)10
Code lines (lines that can run)4
Code lines that did run2
Code lines that did not run2
Coverage (did run/can run)50.00 %
Function listing
time 
Calls 
 line
   1 
function t = trace(A)
   2 
%TRACE  Sum of diagonal elements.
   3 
%   TRACE(A) is the sum of the diagonal elements of A, which is
   4 
%   also the sum of the eigenvalues of A.
   5 
%
   6 
%   Class support for input A:
   7 
%      float: double, single
   8 

   9 
%   Copyright 1984-2011 The MathWorks, Inc. 
  10 

  0.169 
2809422 
  11
if ~ismatrix(A) || size(A,1)~=size(A,2) 
  12 
  error(message('MATLAB:trace:square'));
  13 
end
  3.359 
2809422 
  14
t = full(sum(diag(A))); 

Other subfunctions in this file are not included in this listing.