This is a static copy of a profile report

Home

nonzerosign (55796 calls, 1.027 sec)
Generated 05-Aug-2011 13:03:55 using cpu time.
function in file /usr/local/MATLAB/R2011a/toolbox/shared/optimlib/nonzerosign.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
finitedifferencesfunction55796
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
14
y(x < 0) = -1;
557960.383 s37.2%
12
y = ones(size(x));
557960.240 s23.4%
All other lines  0.404 s39.4%
Totals  1.027 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)12
Code lines (lines that can run)2
Code lines that did run2
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
   time   calls  line
1 function y = nonzerosign(x)
2 %NONZEROSIGN Signum function excluding zero
3 % For each element of X, NONZEROSIGN(X) returns 1 if the element
4 % is greater than or equal to zero and -1 if it is
5 % less than zero. NONZEROSIGN differs from SIGN in that NONZEROSIGN(0)
6 % returns 1, while SIGN(0) returns 0.
7 %
8
9 % Copyright 2008 The MathWorks, Inc.
10 % $Revision: 1.1.6.1 $ $Date: 2008/02/29 13:09:41 $
11
0.24 55796 12 y = ones(size(x));
13
0.38 55796 14 y(x < 0) = -1;