This is a static copy of a profile report

Home

imread>parse_inputs (11550 calls, 2.574 sec)
Generated 05-Nov-2014 07:52:36 using cpu time.
subfunction in file /usr1/opt/matlab/7.13/toolbox/matlab/imagesci/imread.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
imreadfunction11550
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
504
extraArgs = varargin(2:end);
113610.360 s14.0%
469
fmt_s = struct([]);
115500.310 s12.1%
499
if (~isempty(fmt_s))
113610.230 s8.9%
495
if (ischar(varargin{2}))
113610.220 s8.6%
492
filename = varargin{1};
113610.150 s5.8%
All other lines  1.302 s50.6%
Totals  2.574 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function42
Non-code lines (comments, blank lines)18
Code lines (lines that can run)24
Code lines that did run17
Code lines that did not run7
Coverage (did run/can run)70.83 %
Function listing
   time   calls  line
466 function [filename, fmt_s, extraArgs, msg] = parse_inputs(varargin)
467
0.14 11550 468 filename = '';
0.31 11550 469 fmt_s = struct([]);
0.08 11550 470 extraArgs = {};
0.09 11550 471 msg = '';
472
473 % Parse arguments based on their number.
0.14 11550 474 switch(nargin)
0.08 11550 475 case 0
476
477 % Not allowed.
478 msg = 'Too few input arguments.';
479 return;
480
0.09 11550 481 case 1
482
483 % Filename only.
189 484 filename = varargin{1};
189 485 if ~ischar(filename)
486 error(message('MATLAB:imagesci:imread:badImageSourceDatatype'));
487 end
488
0.07 11361 489 otherwise
490
491 % Filename and format or other arguments.
0.15 11361 492 filename = varargin{1};
493
494 % Check whether second argument is a format.
0.22 11361 495 if (ischar(varargin{2}))
496 fmt_s = imformats(varargin{2});
497 end
498
0.23 11361 499 if (~isempty(fmt_s))
500 % The argument matches a format.
501 extraArgs = varargin(3:end);
0.06 11361 502 else
503 % The argument begins the format-specific parameters.
0.36 11361 504 extraArgs = varargin(2:end);
0.09 11361 505 end
506
0.05 11361 507 end