This is a static copy of a profile report

Home

Function details for graphics/private/isslhandleThis is a static copy of a profile report

Home

graphics/private/isslhandle (Calls: 9, Time: 0.003 s)
Generated 02-May-2020 21:54:35 using performance time.
function in file /Applications/MATLAB_R2018a.app/toolbox/matlab/graphics/private/isslhandle.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
graphics/private/isSLorSFfunction9
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
15
if ~(isSimulinkPresent &&a...
90.002 s65.9%
16
isSL = zeros(size(h));
90.000 s10.1%
10
persistent isSimulinkPresent;
90.000 s4.2%
11
if isempty(isSimulinkPresent)
90.000 s3.8%
17
return
90.000 s3.2%
All other lines  0.000 s12.8%
Totals  0.003 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
is_simulink_loadedfunction90.001 s40.0%
Self time (built-ins, overhead, etc.)  0.002 s60.0%
Totals  0.003 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function34
Non-code lines (comments, blank lines)12
Code lines (lines that can run)22
Code lines that did run6
Code lines that did not run16
Coverage (did run/can run)27.27 %
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-2015 The MathWorks, Inc.
   7 

< 0.001 
      9 
   8
narginchk(1,1) 
   9 

< 0.001 
      9 
  10
persistent isSimulinkPresent; 
< 0.001 
      9 
  11
if isempty(isSimulinkPresent) 
  12 
    isSimulinkPresent = exist('is_simulink_loaded'); %#ok<EXIST>
  13 
end
  14 

  0.002 
      9 
  15
if ~(isSimulinkPresent && is_simulink_loaded) 
< 0.001 
      9 
  16
    isSL = zeros(size(h)); 
< 0.001 
      9 
  17
    return 
  18 
end
  19 

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