This is a static copy of a profile report

Home

intmax (6 calls, 0.010 sec)
Generated 14-Nov-2016 07:47:22 using cpu time.
function in file /usr/local/MATLAB/MATLAB_Production_Server/R2015a/toolbox/matlab/elmat/intmax.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
graphics/private/checkImageSizeForPrintfunction3
imwrite>validateSizessubfunction3
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
34
imax = uint32(4294967295);
60 s0%
33
case 'uint32'
60 s0%
31
case 'int32'
60 s0%
29
case 'uint16'
60 s0%
27
case 'int16'
60 s0%
All other lines  0.010 s100.0%
Totals  0.010 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function47
Non-code lines (comments, blank lines)16
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 

      6 
  17 
if (nargin == 0) 
  18 
  imax = int32(2147483647);
      6 
  19 
elseif (nargin == 1) 
      6 
  20 
  classname = varargin{1}; 
      6 
  21 
  if ischar(classname) 
      6 
  22 
    switch (classname) 
      6 
  23 
      case 'int8' 
  24 
        imax = int8(127);
      6 
  25 
      case 'uint8' 
  26 
        imax = uint8(255);
      6 
  27 
      case 'int16' 
  28 
        imax = int16(32767);
      6 
  29 
      case 'uint16' 
  30 
        imax = uint16(65535);
      6 
  31 
      case 'int32' 
  32 
        imax = int32(2147483647);
      6 
  33 
      case 'uint32' 
      6 
  34 
        imax = uint32(4294967295); 
  35 
      case 'int64'
  36 
        imax = int64(9223372036854775807);
  37 
      case 'uint64'
  38 
        imax = uint64(18446744073709551615);
  39 
      otherwise
  40 
        error(message('MATLAB:intmax:invalidClassName'))
  41 
    end
  42 
  else
  43 
    error(message('MATLAB:intmax:inputMustBeString'))
  44 
  end
  45 
else % nargin > 1
  46 
  error(message('MATLAB:intmax:tooManyInputs'));
  47 
end