This is a static copy of a profile report

Home

isprop (Calls: 52, Time: 0.016 s)
Generated 16-Jul-2020 17:09:25 using performance time.
function in file /Applications/MATLAB_R2020a.app/toolbox/matlab/datatypes/isprop.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
printing/private/printjobContentChangesfunction22
...;PointerMixin.hasDisabledInteractionsclass method8
PointerMixin>PointerMixin.getHitObjectclass method8
firePrintBehaviorfunction14
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
23
valid = hasProp(objQueried, pr...
520.011 s65.7%
16
valid = false(size(objQueried)...
520.001 s7.2%
14
case 2
520.001 s5.1%
10
objQueried = varargin{1};
520.001 s4.8%
22
if numel(objQueried) == 1
520.001 s3.2%
All other lines  0.002 s13.9%
Totals  0.016 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
isprop>hasPropsubfunction520.009 s58.3%
Self time (built-ins, overhead, etc.)  0.007 s41.7%
Totals  0.016 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function40
Non-code lines (comments, blank lines)11
Code lines (lines that can run)29
Code lines that did run13
Code lines that did not run16
Coverage (did run/can run)44.83 %
Function listing
time 
Calls 
 line
   1 
function valid = isprop(varargin)
   2 
%ISPROP Returns true if the property exists.
   3 
%   V = ISPROP(H, PROP) Returns true if PROP is a property of H.
   4 
%   V is a logical array of the same size as H.  Each true element of V
   5 
%   corresponds to an element of H that has the property PROP.
   6 

   7 
%   Copyright 1988-2018 The MathWorks, Inc.
   8 

< 0.001 
     52 
   9
    narginchk(2,3); 
< 0.001 
     52 
  10
    objQueried = varargin{1}; 
< 0.001 
     52 
  11
    propName = varargin{2}; 
  12 

< 0.001 
     52 
  13
    switch nargin 
< 0.001 
     52 
  14
        case 2 
< 0.001 
     52 
  15
            try % size may be overloaded by the object and lead to error here 
  0.001 
     52 
  16
                valid = false(size(objQueried)); 
  17 
            catch % return FALSE when SIZE is overloaded to not return numbers
  18 
                valid = false;
  19 
                return;
< 0.001 
     52 
  20
            end 
  21 

< 0.001 
     52 
  22
            if numel(objQueried) == 1 
  0.011 
     52 
  23
                valid = hasProp(objQueried, propName); 
  24 
            else
  25 
                % Use for-loop: input may not support ARRAYFUN (e.g. function_handle)
  26 
                for i = 1:numel(objQueried)
  27 
                    valid(i) = hasProp(objQueried(i), propName);
  28 
                end
< 0.001 
     52 
  29
            end 
  30 
        case 3 % ISPROP for class - package and class name
  31 
            try
  32 
                p = findprop(findclass(findpackage(objQueried),propName),varargin{3});
  33 
                valid = ~isempty(p) && strcmpi(p.Name,varargin{3});
  34 
            catch
  35 
                valid = false;
  36 
            end
  37 
        otherwise
  38 
            assert(false); % Number of inputs should only be the above values
< 0.001 
     52 
  39
    end 
< 0.001 
     52 
  40
end 

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