This is a static copy of a profile reportHome
imagesci/private/readtif>parse_args (11550 calls, 3.234 sec)
Generated 05-Nov-2014 07:52:37 using cpu time.
subfunction in file /usr1/opt/matlab/7.13/toolbox/matlab/imagesci/private/readtif.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 |
129 | check_info(args.info); | 11550 | 0.761 s | 23.5% |  |
99 | if (isnumeric(argp)) | 22722 | 0.290 s | 9.0% |  |
118 | args.(params{idx}) = varargin{... | 11361 | 0.260 s | 8.0% |  |
127 | end | 22722 | 0.240 s | 7.4% |  |
89 | args.index = 1; | 11550 | 0.220 s | 6.8% |  |
All other lines | | | 1.462 s | 45.2% |  |
Totals | | | 3.234 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
imagesci/private/readtif>check_info | subfunction | 11550 | 0.481 s | 14.9% |  |
Self time (built-ins, overhead, etc.) | | | 2.754 s | 85.1% |  |
Totals | | | 3.234 s | 100% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 44 |
Non-code lines (comments, blank lines) | 17 |
Code lines (lines that can run) | 27 |
Code lines that did run | 19 |
Code lines that did not run | 8 |
Coverage (did run/can run) | 70.37 % |
Function listing
time calls line
86 function args = parse_args(varargin)
87 %PARSE_ARGS Convert input arguments to structure of arguments.
88
0.22 11550 89 args.index = 1;
0.08 11550 90 args.pixelregion = [];
0.13 11550 91 args.info = [];
92
0.06 11550 93 params = {'index', 'pixelregion', 'info'};
94
0.16 11550 95 p = 1;
0.11 11550 96 while (p <= nargin)
97
0.15 22722 98 argp = varargin{p};
0.29 22722 99 if (isnumeric(argp))
100
0.05 11361 101 args.index = argp;
0.02 11361 102 p = p + 1;
103
0.05 11361 104 elseif (ischar(argp))
105
0.20 11361 106 idx = find(strncmpi(argp, params, numel(argp)));
107
0.05 11361 108 if (isempty(idx))
109 error(message('MATLAB:imagesci:readtif:unknownParam', argp))
0.05 11361 110 elseif (numel(idx) > 1)
111 error(message('MATLAB:imagesci:readtif:ambiguousParam', argp))
112 end
113
0.06 11361 114 if (p == nargin)
115 error(message('MATLAB:imagesci:readtif:missingValue', argp))
116 end
117
0.26 11361 118 args.(params{idx}) = varargin{p + 1};
0.09 11361 119 p = p + 2;
120
121 else
122
123 error(message('MATLAB:imagesci:readtif:paramType'))
124
125 end
126
0.24 22722 127 end
128
0.76 11550 129 check_info(args.info);
Other subfunctions in this file are not included in this listing.