This is a static copy of a profile report

Home

isScalarInt (Calls: 1026418, Time: 1.625 s)
Generated 04-Jun-2021 04:11:11 using performance time.
function in file C:\Program Files\MATLAB\R2020b\toolbox\matlab\datatypes\shared\matlab_datatypes\+matlab\+internal\+datatypes\isScalarInt.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
tabular.sizefunction8
tabular.subsrefDotfunction1026410
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
32
end
10264180.146 s9.0%
21
isInt = isnumeric(x) &&...
10264180.064 s3.9%
20
if isscalar(x)
10264180.056 s3.5%
22
if nargin == 1
10264180.053 s3.3%
25
tf = isInt && (x >=...
10264100.051 s3.1%
All other lines  1.255 s77.2%
Totals  1.625 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function32
Non-code lines (comments, blank lines)19
Code lines (lines that can run)13
Code lines that did run9
Code lines that did not run4
Coverage (did run/can run)69.23 %
Function listing
time 
Calls 
 line
   1 
function [tf,isInt] = isScalarInt(x,lower,upper) %#codegen
   2 
%ISSCALARINT Require a scalar integer
   3 
%   T = ISSCALARINT(X) returns true if X is a scalar integer value, and false
   4 
%   otherwise.
   5 
%
   6 
%   T = ISSCALARINT(X,0) returns true if X is a non-negative scalar integer
   7 
%   value, and false otherwise.
   8 
%
   9 
%   T = ISSCALARINT(X,1) returns true if X is a positive scalar integer value,
  10 
%   and false otherwise.
  11 
%
  12 
%   T = ISSCALARINT(X,LOWER,UPPER) returns true if X is a scalar integer value
  13 
%   from LOWER to UPPER, and false otherwise.
  14 
%
  15 
%   [T,ISINT] = ISSCALARINT(X,...) returns true in ISINT if X is a scalar
  16 
%   integer value, even if it is not within the desired range.
  17 

  18 
%   Copyright 2013 The MathWorks, Inc.
  19 

  0.056 
1026418 
  20
if isscalar(x) 
  0.064 
1026418 
  21
    isInt = isnumeric(x) && isreal(x) && (round(x) == x) && isfinite(x); 
  0.053 
1026418 
  22
    if nargin == 1 
  23 
        tf = isInt;
  0.050 
1026418 
  24
    elseif nargin == 2 
  0.051 
1026410 
  25
        tf = isInt && (x >= lower); 
< 0.001 
      8 
  26
    else % nargin == 3 
< 0.001 
      8 
  27
        tf = isInt && (lower <= x) && (x <= upper); 
  0.048 
1026418 
  28
    end 
  29 
else
  30 
    tf = false;
  31 
    isInt = false;
  0.146 
1026418 
  32
end 

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