num2str>handleNumericPrecision (152 calls, 0.020 sec)
Generated 14-Nov-2016 07:47:08 using cpu time.
subfunction in file /usr/local/MATLAB/MATLAB_Production_Server/R2015a/toolbox/matlab/strfun/num2str.m
Copy to new window for comparing multiple runs
Function Name | Function Type | Calls |
num2str | function | 152 |
Line Number | Code | Calls | Total Time | % Time | Time Plot |
182 | s = convertUsingRecycledSprint... | 152 | 0.020 s | 100.0% | ![]() |
191 | end | 152 | 0 s | 0% | ![]() |
184 | f = ''; | 152 | 0 s | 0% | ![]() |
183 | forceWidth = 0; | 152 | 0 s | 0% | ![]() |
181 | if isreal(x) | 152 | 0 s | 0% | ![]() |
All other lines | 0 s | 0% | ![]() | ||
Totals | 0.020 s | 100% |
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
num2str>convertUsingRecycledSprintf | subfunction | 152 | 0.020 s | 100.0% | ![]() |
Self time (built-ins, overhead, etc.) | 0 s | 0% | ![]() | ||
Totals | 0.020 s | 100% |
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 % |
time | calls | line | |
---|---|---|---|
180 | function [s, forceWidth, f] = handleNumericPrecision(x, precision) | ||
152 | 181 | if isreal(x) | |
0.02 | 152 | 182 | s = convertUsingRecycledSprintf(x, precision); |
152 | 183 | forceWidth = 0; | |
152 | 184 | f = ''; | |
185 | else | ||
186 | floatFieldExtra = 6; | ||
187 | s = ''; | ||
188 | forceWidth = precision+floatFieldExtra; | ||
189 | f = sprintf('%%.%dg', precision); | ||
190 | end | ||
152 | 191 | end |
Other subfunctions in this file are not included in this listing.