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
Function Name | Function Type | Calls |
isSLorSF | function | 104 |
Line Number | Code | Calls | Total Time | % Time | Time Plot |
10 | isSimulinkPresent = exist('is_... | 104 | 1.469 s | 99.5% | |
12 | if ~(isSimulinkPresent &&a... | 104 | 0.004 s | 0.3% | |
13 | isSL = zeros(size(h)); | 104 | 0.001 s | 0.1% | |
14 | return | 104 | 0.000 s | 0.0% | |
8 | narginchk(1,1) | 104 | 0.000 s | 0.0% | |
All other lines | 0.001 s | 0.1% | |||
Totals | 1.476 s | 100% |
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
is_simulink_loaded | function | 104 | 0.002 s | 0.2% | |
Self time (built-ins, overhead, etc.) | 1.474 s | 99.8% | |||
Totals | 1.476 s | 100% |
Total lines in function | 31 |
Non-code lines (comments, blank lines) | 12 |
Code lines (lines that can run) | 19 |
Code lines that did run | 5 |
Code lines that did not run | 14 |
Coverage (did run/can run) | 26.32 % |
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 |