This is a static copy of a profile report

Home

isslhandle (Calls: 104, Time: 1.476 s)
Generated 16-Jul-2020 17:09:13 using performance time.
function in file /Applications/MATLAB_R2020a.app/toolbox/matlab/graphics/printing/+matlab/+graphics/+internal/isslhandle.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
isSLorSFfunction104
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
10
isSimulinkPresent = exist('is_...
1041.469 s99.5%
12
if ~(isSimulinkPresent &&a...
1040.004 s0.3%
13
isSL = zeros(size(h));
1040.001 s0.1%
14
return
1040.000 s0.0%
8
narginchk(1,1)
1040.000 s0.0%
All other lines  0.001 s0.1%
Totals  1.476 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
is_simulink_loadedfunction1040.002 s0.2%
Self time (built-ins, overhead, etc.)  1.474 s99.8%
Totals  1.476 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function31
Non-code lines (comments, blank lines)12
Code lines (lines that can run)19
Code lines that did run5
Code lines that did not run14
Coverage (did run/can run)26.32 %
Function listing
time 
Calls 
 line
   1 
function isSL = isslhandle(h)
   2 
%ISSLHANDLE True for Simulink object handles for models or subsystem.
   3 
%   ISSLHANDLE(H) returns an array that contains 1's where the elements of
   4 
%   H are valid printable Simulink object handles and 0's where they are not.
   5 

   6 
%   Copyright 1984-2020 The MathWorks, Inc.
   7 

< 0.001 
    104 
   8
narginchk(1,1) 
   9 

  1.469 
    104 
  10
isSimulinkPresent = exist('is_simulink_loaded', 'file');  
  11 

  0.004 
    104 
  12
if ~(isSimulinkPresent && is_simulink_loaded) 
  0.001 
    104 
  13
    isSL = zeros(size(h)); 
< 0.001 
    104 
  14
    return 
  15 
end
  16 

  17 
%See if it is a handle of some kind
  18 
isSL = ~ishghandle(h);
  19 
for i = 1:length(h(:))
  20 
    if isSL(i)
  21 
        %If can not GET the Type of the object then it is not an HG object.
  22 
        try
  23 
            isSL(i) = strcmp( 'block_diagram', get_param( h(i), 'type' ) );
  24 
            if ~isSL(i)
  25 
                isSL(i) = strcmp( 'SubSystem', get_param( h(i), 'blocktype' ) );
  26 
            end
  27 
        catch
  28 
            isSL(i) = false;
  29 
        end
  30 
    end
  31 
end