This is a static copy of a profile reportHome
intmax (405 calls, 0.010 sec)
Generated 05-Nov-2014 07:52:50 using cpu time.
function in file /usr1/opt/matlab/7.13/toolbox/matlab/elmat/intmax.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 |
18 | if (nargin == 0) | 405 | 0.010 s | 100.0% |  |
31 | imax = uint16(65535); | 404 | 0 s | 0% |  |
30 | case 'uint16' | 404 | 0 s | 0% |  |
28 | case 'int16' | 404 | 0 s | 0% |  |
27 | imax = uint8(255); | 1 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.010 s | 100% | |
Children (called functions)
No childrenCode Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 48 |
Non-code lines (comments, blank lines) | 17 |
Code lines (lines that can run) | 31 |
Code lines that did run | 11 |
Code lines that did not run | 20 |
Coverage (did run/can run) | 35.48 % |
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
0.01 405 18 if (nargin == 0)
19 imax = int32(2147483647);
405 20 elseif (nargin == 1)
405 21 classname = varargin{1};
405 22 if ischar(classname)
405 23 switch (classname)
405 24 case 'int8'
25 imax = int8(127);
405 26 case 'uint8'
1 27 imax = uint8(255);
404 28 case 'int16'
29 imax = int16(32767);
404 30 case 'uint16'
404 31 imax = uint16(65535);
32 case 'int32'
33 imax = int32(2147483647);
34 case 'uint32'
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