This is a static copy of a profile reportHome
imresize>scaleOrSize (82820 calls, 4.646 sec)
Generated 05-Nov-2014 07:52:48 using cpu time.
subfunction in file /usr1/opt/matlab/7.13/toolbox/images/images/imresize.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
377 | iptcheckinput(arg, {'numeric'}... | 82820 | 2.113 s | 45.5% |  |
379 | output_size = double(arg); | 82820 | 0.541 s | 11.6% |  |
366 | scale = []; | 82820 | 0.270 s | 5.8% |  |
367 | output_size = []; | 82820 | 0.260 s | 5.6% |  |
375 | elseif isnumeric(arg) &&am... | 82820 | 0.230 s | 5.0% |  |
All other lines | | | 1.232 s | 26.5% |  |
Totals | | | 4.646 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
iptcheckinput | MEX-file | 82820 | 0.601 s | 12.9% |  |
Self time (built-ins, overhead, etc.) | | | 4.046 s | 87.1% |  |
Totals | | | 4.646 s | 100% | |
Code Analyzer results
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 21 |
Non-code lines (comments, blank lines) | 10 |
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 % |
Function listing
time calls line
363 function [scale, output_size] = scaleOrSize(arg, position)
364 % Determine whether ARG is the scale factor or the output size.
365
0.27 82820 366 scale = [];
0.26 82820 367 output_size = [];
368
0.23 82820 369 if isnumeric(arg) && isscalar(arg)
370 % Argument looks like a scale factor.
371 iptcheckinput(arg, {'numeric'}, {'nonzero', 'real'}, mfilename, 'SCALE', ...
372 position);
373 scale = double(arg);
374
0.23 82820 375 elseif isnumeric(arg) && isvector(arg) && (numel(arg) == 2)
376 % Argument looks like output_size.
2.11 82820 377 iptcheckinput(arg, {'numeric'}, {'vector', 'real', 'positive'}, ...
378 mfilename, '[MROWS NCOLS]', position);
0.54 82820 379 output_size = double(arg);
380
381 else
382 error(message('images:imresize:badScaleOrSize'));
383 end
Other subfunctions in this file are not included in this listing.