This is a static copy of a profile reportHome
num2str>handleNumericPrecision (2324 calls, 0.811 sec)
Generated 05-Nov-2014 07:52:34 using cpu time.
subfunction in file /usr1/opt/matlab/7.13/toolbox/matlab/strfun/num2str.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Function Name | Function Type | Calls |
num2str | function | 2324 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
187 | s = convertUsingRecycledSprint... | 2324 | 0.691 s | 85.2% |  |
186 | if isreal(x) | 2324 | 0.040 s | 4.9% |  |
189 | f = ''; | 2324 | 0.020 s | 2.5% |  |
188 | forceWidth = 0; | 2324 | 0.010 s | 1.2% |  |
196 | end | 2324 | 0 s | 0% |  |
All other lines | | | 0.050 s | 6.2% |  |
Totals | | | 0.811 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
num2str>convertUsingRecycledSprintf | subfunction | 2324 | 0.641 s | 79.0% |  |
Self time (built-ins, overhead, etc.) | | | 0.170 s | 21.0% |  |
Totals | | | 0.811 s | 100% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 12 |
Non-code lines (comments, blank lines) | 1 |
Code lines (lines that can run) | 11 |
Code lines that did run | 5 |
Code lines that did not run | 6 |
Coverage (did run/can run) | 45.45 % |
Function listing
time calls line
185 function [s, forceWidth, f] = handleNumericPrecision(x, precision)
0.04 2324 186 if isreal(x)
0.69 2324 187 s = convertUsingRecycledSprintf(x, precision);
0.01 2324 188 forceWidth = 0;
0.02 2324 189 f = '';
190 else
191 floatFieldExtra = 6;
192 s = '';
193 forceWidth = precision+floatFieldExtra;
194 f = sprintf('%%.%dg', precision);
195 end
2324 196 end
Other subfunctions in this file are not included in this listing.