attributes (Calls: 2, Time: 0.010 s)
Generated 04-Jun-2021 04:11:07 using performance time.
function in file C:\Program Files\MATLAB\R2020b\toolbox\matlab\lang\+matlab\+internal\+validators\attributes.m
Copy to new window for comparing multiple runs
Function Name | Function Type | Calls |
validatestring>checkString | subfunction | 2 |
Line Number | Code | Calls | Total Time | % Time | Time Plot |
20 | checkAttrs( A, attrs, fname, m... | 2 | 0.004 s | 43.5% | |
9 | [ A, classes, attrs, fname, ms... | 2 | 0.004 s | 38.2% | |
17 | checkClass( A, classes, fname,... | 2 | 0.001 s | 12.3% | |
34 | end | 2 | 0.000 s | 0.1% | |
15 | try | 2 | 0.000 s | 0.0% | |
All other lines | 0.001 s | 5.9% | |||
Totals | 0.010 s | 100% |
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
attributes>checkAttrs | subfunction | 2 | 0.004 s | 40.4% | |
attributes>checkInputs | subfunction | 2 | 0.003 s | 33.8% | |
attributes>checkClass | subfunction | 2 | 0.001 s | 9.8% | |
Self time (built-ins, overhead, etc.) | 0.002 s | 16.0% | |||
Totals | 0.010 s | 100% |
Total lines in function | 34 |
Non-code lines (comments, blank lines) | 15 |
Code lines (lines that can run) | 19 |
Code lines that did run | 10 |
Code lines that did not run | 9 |
Coverage (did run/can run) | 52.63 % |
time | Calls | line | |
---|---|---|---|
1 | function attributes( varargin ) | ||
< 0.001 | 2 | 2 | ; %#ok<NOSEM> % Undocumented |
3 | |||
4 | % Copyright 2012-2019 The MathWorks, Inc. | ||
5 | |||
< 0.001 | 2 | 6 | narginchk(3,6); |
7 | |||
< 0.001 | 2 | 8 | try |
0.004 | 2 | 9 | [ A, classes, attrs, fname, msgId, argname, argpos ] = checkInputs( varargin ); |
10 | catch e | ||
11 | % only VALIDATEATTRIBUTES should be on the stack | ||
12 | throw(e) | ||
< 0.001 | 2 | 13 | end |
14 | |||
< 0.001 | 2 | 15 | try |
16 | % check the class of A | ||
0.001 | 2 | 17 | checkClass( A, classes, fname, msgId, argname, argpos ); |
18 | |||
19 | % check the attributes of A | ||
0.004 | 2 | 20 | checkAttrs( A, attrs, fname, msgId, argname, argpos ); |
21 | catch e | ||
22 | myId = 'MATLAB:validateattributes:'; | ||
23 | if strncmp( myId, e.identifier, length(myId) ) | ||
24 | % leave VALIDATEATTRIBUTES on the stack, because there was a misuse | ||
25 | % of VALIDATEATTRIBUTES itself | ||
26 | throw(e) | ||
27 | else | ||
28 | % strip VALIDATEATTRIBUTES off the stack so that the error looks like | ||
29 | % it comes from the caller just as if it had hand-coded its input checking | ||
30 | throwAsCaller( e ) | ||
31 | end | ||
< 0.001 | 2 | 32 | end |
33 | |||
< 0.001 | 2 | 34 | end |
Other subfunctions in this file are not included in this listing.