This is a static copy of a profile report

Home

intmax (40 calls, 0.000 sec)
Generated 05-Aug-2011 13:03:43 using cpu time.
function in file /usr/local/MATLAB/R2011a/toolbox/matlab/elmat/intmax.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
imwrite>validateSizessubfunction40
Lines where the most time was spent
No measurable time spent in this function

Line NumberCodeCallsTotal Time% TimeTime Plot
35
imax = uint32(4294967295);
400 s0%
34
case 'uint32'
400 s0%
32
case 'int32'
400 s0%
30
case 'uint16'
400 s0%
28
case 'int16'
400 s0%
All other lines  0 s0%
Totals  0 s0% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function48
Non-code lines (comments, blank lines)17
Code lines (lines that can run)31
Code lines that did run12
Code lines that did not run19
Coverage (did run/can run)38.71 %
Function listing
   time   calls  line
1 function imax = intmax(varargin)
2 %INTMAX Largest positive integer value.
3 % X = INTMAX is the largest positive value representable in an int32.
4 % Any value that is larger than INTMAX will saturate to INTMAX when
5 % cast to int32.
6 %
7 % INTMAX('int32') is the same as INTMAX with no arguments.
8 %
9 % INTMAX(CLASSNAME) is the largest positive value in the integer class
10 % CLASSNAME. Valid values of CLASSNAME are 'int8', 'uint8', 'int16',
11 % 'uint16', 'int32', 'uint32', 'int64' and 'uint64'.
12 %
13 % See also INTMIN, REALMAX.
14
15 % Copyright 1984-2009 The MathWorks, Inc.
16 % $Revision: 1.1.6.8 $ $Date: 2010/08/23 23:08:05 $
17
40 18 if (nargin == 0)
19 imax = int32(2147483647);
40 20 elseif (nargin == 1)
40 21 classname = varargin{1};
40 22 if ischar(classname)
40 23 switch (classname)
40 24 case 'int8'
25 imax = int8(127);
40 26 case 'uint8'
27 imax = uint8(255);
40 28 case 'int16'
29 imax = int16(32767);
40 30 case 'uint16'
31 imax = uint16(65535);
40 32 case 'int32'
33 imax = int32(2147483647);
40 34 case 'uint32'
40 35 imax = uint32(4294967295);
36 case 'int64'
37 imax = int64(9223372036854775807);
38 case 'uint64'
39 imax = uint64(18446744073709551615);
40 otherwise
41 error(message('MATLAB:intmax:invalidClassName'))
42 end
43 else
44 error(message('MATLAB:intmax:inputMustBeString'))
45 end
46 else % nargin > 1
47 error(message('MATLAB:intmax:tooManyInputs'));
48 end