This is a static copy of a profile reportHome
median>meanof (170 calls, 0.022 sec)
Generated 05-Aug-2011 13:03:50 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/datafun/median.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Function Name | Function Type | Calls |
median | function | 170 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
157 | k = (sign(a) ~= sign(b)) | isi... | 170 | 0.022 s | 100.0% |  |
158 | c(k) = (a(k)+b(k))/2; | 170 | 0 s | 0% |  |
156 | c = a + (b-a)/2; | 170 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.022 s | 100% | |
Children (called functions)
No childrenCode Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 8 |
Non-code lines (comments, blank lines) | 5 |
Code lines (lines that can run) | 3 |
Code lines that did run | 3 |
Code lines that did not run | 0 |
Coverage (did run/can run) | 100.00 % |
Function listing
time calls line
151 function c = meanof(a,b)
152 % MEANOF the mean of A and B with B > A
153 % MEANOF calculates the mean of A and B. It uses different formula
154 % in order to avoid overflow in floating point arithmetic.
155
170 156 c = a + (b-a)/2;
0.02 170 157 k = (sign(a) ~= sign(b)) | isinf(a) | isinf(b);
170 158 c(k) = (a(k)+b(k))/2;
Other subfunctions in this file are not included in this listing.