num2str>handleNumericPrecision (Calls: 58, Time: 0.012 s)
Generated 16-Jul-2020 17:09:45 using performance time.
subfunction in file /Applications/MATLAB_R2020a.app/toolbox/matlab/strfun/num2str.m
Copy to new window for comparing multiple runs
Function Name | Function Type | Calls |
num2str | function | 58 |
Line Number | Code | Calls | Total Time | % Time | Time Plot |
193 | s = convertUsingRecycledSprint... | 58 | 0.011 s | 91.9% | |
192 | if isreal(x) | 58 | 0.000 s | 2.5% | |
202 | end | 58 | 0.000 s | 0.3% | |
194 | forceWidth = 0; | 58 | 0.000 s | 0.1% | |
195 | f = ''; | 58 | 0.000 s | 0.1% | |
All other lines | 0.001 s | 5.1% | |||
Totals | 0.012 s | 100% |
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
num2str>convertUsingRecycledSprintf | subfunction | 58 | 0.010 s | 83.3% | |
Self time (built-ins, overhead, etc.) | 0.002 s | 16.7% | |||
Totals | 0.012 s | 100% |
Line number | Message |
Total lines in function | 12 |
Non-code lines (comments, blank lines) | 1 |
Code lines (lines that can run) | 11 |
Code lines that did run | 6 |
Code lines that did not run | 5 |
Coverage (did run/can run) | 54.55 % |
time | Calls | line | |
---|---|---|---|
191 | function [s, forceWidth, f] = handleNumericPrecision(x, precision) | ||
< 0.001 | 58 | 192 | if isreal(x) |
0.011 | 58 | 193 | s = convertUsingRecycledSprintf(x, precision); |
< 0.001 | 58 | 194 | forceWidth = 0; |
< 0.001 | 58 | 195 | f = ''; |
196 | else | ||
197 | floatFieldExtra = 6; | ||
198 | s = ''; | ||
199 | forceWidth = precision+floatFieldExtra; | ||
200 | f = sprintf('%%.%dg', precision); | ||
< 0.001 | 58 | 201 | end |
< 0.001 | 58 | 202 | end |
Other subfunctions in this file are not included in this listing.