This is a static copy of a profile reportHome
images/private/morphop>ProcessOptionalArgs (14245 calls, 2.854 sec)
Generated 05-Nov-2014 07:52:49 using cpu time.
subfunction in file /usr1/opt/matlab/7.13/toolbox/images/images/private/morphop.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 |
305 | string = iptcheckstrs(varargin... | 12524 | 1.071 s | 37.5% |  |
303 | for k = 1:length(varargin) | 14245 | 0.280 s | 9.8% |  |
324 | iptcheckinput(unpacked_M, {'do... | 12120 | 0.250 s | 8.8% |  |
304 | if ischar(varargin{k}) | 24644 | 0.230 s | 8.1% |  |
321 | end | 24644 | 0.090 s | 3.2% |  |
All other lines | | | 0.931 s | 32.6% |  |
Totals | | | 2.854 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
iptcheckstrs | function | 12524 | 0.901 s | 31.6% |  |
iptcheckinput | MEX-file | 12120 | 0.120 s | 4.2% |  |
Self time (built-ins, overhead, etc.) | | | 1.833 s | 64.2% |  |
Totals | | | 2.854 s | 100% | |
Code Analyzer results
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 35 |
Non-code lines (comments, blank lines) | 12 |
Code lines (lines that can run) | 23 |
Code lines that did run | 23 |
Code lines that did not run | 0 |
Coverage (did run/can run) | 100.00 % |
Function listing
time calls line
293 function [padopt,packopt,unpacked_M] = ProcessOptionalArgs(func_name, varargin)
294
295 % Default values
0.03 14245 296 padopt = 'same';
0.02 14245 297 packopt = 'notpacked';
14245 298 unpacked_M = -1;
0.04 14245 299 check_M = false;
300
0.07 14245 301 allowed_strings = {'same','full','ispacked','notpacked'};
302
0.28 14245 303 for k = 1:length(varargin)
0.23 24644 304 if ischar(varargin{k})
1.07 12524 305 string = iptcheckstrs(varargin{k}, allowed_strings, ...
306 func_name, 'OPTION', k+2);
0.06 12524 307 switch string
0.06 12524 308 case {'full','same'}
404 309 padopt = string;
310
0.06 12120 311 case {'ispacked','notpacked'}
0.07 12120 312 packopt = string;
313
0.05 12120 314 end
315
0.05 12120 316 else
0.06 12120 317 unpacked_M = varargin{k};
0.03 12120 318 check_M = true;
0.01 12120 319 M_pos = k+2;
0.06 12120 320 end
0.09 24644 321 end
322
0.04 14245 323 if check_M
0.25 12120 324 iptcheckinput(unpacked_M, {'double'},...
325 {'real' 'nonsparse' 'scalar' 'integer' 'nonnegative'}, ...
326 func_name, 'M', M_pos);
0.05 12120 327 end
Other subfunctions in this file are not included in this listing.