This is a static copy of a profile report

Home

iptchecknargin (303748 calls, 4.236 sec)
Generated 05-Nov-2014 07:52:46 using cpu time.
function in file /usr1/opt/matlab/7.13/toolbox/shared/imageslib/iptchecknargin.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
imhist>parse_inputssubfunction404
getrangefromclassfunction404
padarray>ParseInputssubfunction53999
bwdist>parse_inputssubfunction808
im2doublefunction404
bwlabeln>parse_inputssubfunction404
images/private/tformfunction3442
ipplfunction1721
fliptformfunction1721
bwboundaries>parseInputssubfunction1721
bwlabelfunction18589
imclearborder>parse_inputssubfunction1721
imerodefunction7781
images/private/morphop>ParseInputssubfunction14245
strel>ParseInputssubfunction3135
imreconstruct>ParseInputssubfunction13839
imresize>parseInputssubfunction82820
imdilatefunction6464
bwpackfunction202
bwunpackfunction202
imclose>ParseInputssubfunction6060
imfill>parse_inputssubfunction12118
bwperimfunction18173
applylut>ParseInputssubfunction53371
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
59
elseif numInputs > high
3037481.112 s26.2%
40
if numInputs < low
3037481.011 s23.9%
All other lines  2.113 s49.9%
Totals  4.236 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function78
Non-code lines (comments, blank lines)51
Code lines (lines that can run)27
Code lines that did run2
Code lines that did not run25
Coverage (did run/can run)7.41 %
Function listing
   time   calls  line
1 function iptchecknargin(low, high, numInputs, function_name)
2 %IPTCHECKNARGIN Check number of input arguments.
3 % IPTCHECKNARGIN(LOW,HIGH,NUM_INPUTS,FUNC_NAME) checks whether
4 % the number of input arguments NUM_INPUTS is in the range specified
5 % by LOW and HIGH. If NUM_INPUTS is not in this range, IPTCHECKNARGIN
6 % issues a formatted error message.
7 %
8 % LOW must be a scalar nonnegative integer.
9 %
10 % HIGH must be a scalar nonnegative integer or Inf.
11 %
12 % FUNC_NAME is a string that specifies the name used in the formatted
13 % error message to identify the function checking its input
14 % arguments.
15 %
16 % Example
17 % -------
18 %
19 % Create a function and use IPTCHECKNARGIN to check that the
20 % number of arguments passed to the function is within the
21 % expected range.
22 %
23 % function test_function(varargin)
24 % iptchecknargin(1,3,nargin,mfilename);
25 %
26 % Trigger the error message by executing the function at
27 % the MATLAB command line, specifying more the expected
28 % number of arguments.
29 %
30 % test_function(1,2,3,4)
31 %
32 % See also IPTCHECKHANDLE, IPTCHECKINPUT, IPTCHECKMAP, IPTCHECKSTRS,
33 % IPTNUM2ORDINAL.
34
35 % Copyright 1993-2004 The MathWorks, Inc.
36 % $Revision: 1.1.6.2.4.1 $ $Date: 2011/07/07 14:32:37 $
37
38 % Input arguments are not checked for validity.
39
1.01 303748 40 if numInputs < low
41 msgId = sprintf('images:%s:tooFewInputs', function_name);
42 if low == 1
43 msg1 = sprintf('Function %s expected at least 1 input argument', ...
44 upper(function_name));
45 else
46 msg1 = sprintf('Function %s expected at least %d input arguments', ...
47 upper(function_name), low);
48 end
49
50 if numInputs == 1
51 msg2 = 'but was called instead with 1 input argument.';
52 else
53 msg2 = sprintf('but was called instead with %d input arguments.', ...
54 numInputs);
55 end
56
57 error(msgId, '%s\n%s', msg1, msg2);
58
1.11 303748 59 elseif numInputs > high
60 msgId = sprintf('images:%s:tooManyInputs', function_name);
61
62 if high == 1
63 msg1 = sprintf('Function %s expected at most 1 input argument', ...
64 upper(function_name));
65 else
66 msg1 = sprintf('Function %s expected at most %d input arguments', ...
67 upper(function_name), high);
68 end
69
70 if numInputs == 1
71 msg2 = 'but was called instead with 1 input argument.';
72 else
73 msg2 = sprintf('but was called instead with %d input arguments.', ...
74 numInputs);
75 end
76
77 error(msgId, '%s\n%s', msg1, msg2);
78 end

Other subfunctions in this file are not included in this listing.