This is a static copy of a profile report

Home

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

Parents (calling functions)

Function NameFunction TypeCalls
table.table>table.tableclass method2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
21
isInt = isnumeric(x) &&...
20.000 s49.4%
25
tf = isInt && all(x(:)...
20.000 s27.9%
24
elseif nargin == 2
20.000 s5.2%
28
end
20.000 s0.1%
22
if nargin == 1
20.000 s0.0%
All other lines  0.000 s17.3%
Totals  0.001 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function28
Non-code lines (comments, blank lines)20
Code lines (lines that can run)8
Code lines that did run5
Code lines that did not run3
Coverage (did run/can run)62.50 %
Function listing
time 
Calls 
 line
   1 
function [tf,isInt] = isIntegerVals(x,lower,upper)  %#codegen
   2 
%ISINTEGERVALS Require an array of integer values
   3 
%   T = ISINTEGERVALS(X) returns true if X contains integer values, and false
   4 
%   otherwise.
   5 
%
   6 
%   T = ISINTEGERVALS(X,0) returns true if X contains non-negative integer
   7 
%   values, and false otherwise.
   8 
%
   9 
%   T = ISINTEGERVALS(X,1) returns true if X contains positive integer values,
  10 
%   and false otherwise.
  11 
%
  12 
%   T = ISINTEGERVALS(X,LOWER,UPPER) returns true if X contains integer values
  13 
%   from LOWER to UPPER, and false otherwise.
  14 
%
  15 
%   [T,ISINT] = ISINTEGERVALS(X,...) returns true in ISINT if X contains
  16 
%   integer values, even if they are not within the desired range.
  17 

  18 

  19 
%   Copyright 2013-2019 The MathWorks, Inc.
  20 

< 0.001 
      2 
  21
isInt = isnumeric(x) && isreal(x) && all(round(x(:)) == x(:)) && all(isfinite(x(:))); 
< 0.001 
      2 
  22
if nargin == 1 
  23 
    tf = isInt;
< 0.001 
      2 
  24
elseif nargin == 2 
< 0.001 
      2 
  25
    tf = isInt && all(x(:) >= lower); 
  26 
else % nargin == 3
  27 
    tf = isInt && all((lower <= x(:)) & (x(:) <= upper));
< 0.001 
      2 
  28
end 

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