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
Function Name | Function Type | Calls |
graphics/private/isSLorSF | function | 9 |
Line Number | Code | Calls | Total Time | % Time | Time Plot |
15 | if ~(isSimulinkPresent &&a... | 9 | 0.002 s | 65.9% | |
16 | isSL = zeros(size(h)); | 9 | 0.000 s | 10.1% | |
10 | persistent isSimulinkPresent; | 9 | 0.000 s | 4.2% | |
11 | if isempty(isSimulinkPresent) | 9 | 0.000 s | 3.8% | |
17 | return | 9 | 0.000 s | 3.2% | |
All other lines | 0.000 s | 12.8% | |||
Totals | 0.003 s | 100% |
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
is_simulink_loaded | function | 9 | 0.001 s | 40.0% | |
Self time (built-ins, overhead, etc.) | 0.002 s | 60.0% | |||
Totals | 0.003 s | 100% |
Total lines in function | 34 |
Non-code lines (comments, blank lines) | 12 |
Code lines (lines that can run) | 22 |
Code lines that did run | 6 |
Code lines that did not run | 16 |
Coverage (did run/can run) | 27.27 % |
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 |