This is a static copy of a profile reportHome
num2str>convertUsingRecycledSprintf (2 calls, 0.000 sec)
Generated 05-Aug-2011 13:00:41 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/strfun/num2str.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
No measurable time spent in this functionLine Number | Code | Calls | Total Time | % Time | Time Plot |
227 | end | 2 | 0 s | 0% |  |
226 | s = strtrim(s); | 2 | 0 s | 0% |  |
218 | if ~isempty(pads) | 2 | 0 s | 0% |  |
217 | pads = find(pads); | 2 | 0 s | 0% |  |
215 | s = char(scell{:}); | 2 | 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 | 27 |
Non-code lines (comments, blank lines) | 5 |
Code lines (lines that can run) | 22 |
Code lines that did run | 14 |
Code lines that did not run | 8 |
Coverage (did run/can run) | 63.64 % |
Function listing
time calls line
201 function s = convertUsingRecycledSprintf(x, d)
2 202 floatFieldExtra = 7;
2 203 f = sprintf('%%%.0f.%.0fg', d+floatFieldExtra, d);
204
2 205 [m, n] = size(x);
2 206 scell = cell(1,m);
2 207 pads = logical([]);
2 208 for i = 1:m
2 209 scell{i} = sprintf(f,x(i,:));
2 210 if n > 1 && (min(x(i,:)) < 0)
211 pads(regexp(scell{i}, '([^\sEe])-')) = true;
212 end
2 213 end
214
2 215 s = char(scell{:});
216
2 217 pads = find(pads);
2 218 if ~isempty(pads)
219 pads = fliplr(pads);
220 spacecol = char(ones(m,1)*' ');
221 for pad = pads
222 s = [s(:,1:pad) spacecol s(:,pad+1:end)];
223 end
224 end
225
2 226 s = strtrim(s);
2 227 end