This is a static copy of a profile reportHome
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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
14 | y(x < 0) = -1; | 55796 | 0.383 s | 37.2% |  |
12 | y = ones(size(x)); | 55796 | 0.240 s | 23.4% |  |
All other lines | | | 0.404 s | 39.4% |  |
Totals | | | 1.027 s | 100% | |
Children (called functions)
No childrenCode Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 14 |
Non-code lines (comments, blank lines) | 12 |
Code lines (lines that can run) | 2 |
Code lines that did run | 2 |
Code lines that did not run | 0 |
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;