This is a static copy of a profile reportHome
median>meanof (1 call, 0.000 sec)
Generated 14-Nov-2016 07:47:25 using cpu time.
subfunction in file /usr/local/MATLAB/MATLAB_Production_Server/R2015a/toolbox/matlab/datafun/median.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Function Name | Function Type | Calls |
median | function | 1 |
Lines where the most time was spent
No measurable time spent in this functionLine Number | Code | Calls | Total Time | % Time | Time Plot |
196 | c(k) = (a(k)+b(k))/2; | 1 | 0 s | 0% |  |
195 | k = (sign(a) ~= sign(b)) | isi... | 1 | 0 s | 0% |  |
194 | c = a + (b-a)/2; | 1 | 0 s | 0% |  |
187 | if isinteger(a) | 1 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0 s | 0% | |
Children (called functions)
No childrenCode Analyzer results
No Code Analyzer messages.Coverage results
Show coverage for parent directory
Total lines in function | 15 |
Non-code lines (comments, blank lines) | 6 |
Code lines (lines that can run) | 9 |
Code lines that did run | 4 |
Code lines that did not run | 5 |
Coverage (did run/can run) | 44.44 % |
Function listing
time | calls | line |
---|
| | 182 | function c = meanof(a,b)
|
| | 183 | % MEANOF the mean of A and B with B > A
|
| | 184 | % MEANOF calculates the mean of A and B. It uses different formula
|
| | 185 | % in order to avoid overflow in floating point arithmetic.
|
| | 186 |
|
| 1 | 187 | if isinteger(a)
|
| | 188 | % Swap integers such that ABS(B) > ABS(A), for correct rounding
|
| | 189 | ind = b < 0;
|
| | 190 | temp = a(ind);
|
| | 191 | a(ind) = b(ind);
|
| | 192 | b(ind) = temp;
|
| | 193 | end
|
| 1 | 194 | c = a + (b-a)/2;
|
| 1 | 195 | k = (sign(a) ~= sign(b)) | isinf(a) | isinf(b);
|
| 1 | 196 | c(k) = (a(k)+b(k))/2;
|
Other subfunctions in this file are not included in this listing.