mustBeMember (Calls: 2, Time: 0.012 s)
Generated 18-May-2021 16:05:25 using performance time.
function in file /usr/local/MATLAB/R2021a/toolbox/matlab/validators/mustBeMember.m
Copy to new window for comparing multiple runs
| Function Name | Function Type | Calls |
| ...lugin>PostUpdatePlugin.doCacheLoad | class method | 2 |
| Line Number | Code | Calls | Total Time | % Time | Time Plot |
| 14 | if ~all(ismember(A, B), "all") | 2 | 0.012 s | 99.5% | |
| 23 | end | 2 | 0.000 s | 0.1% | |
| 22 | end | 2 | 0.000 s | 0.1% | |
| All other lines | 0.000 s | 0.3% | |||
| Totals | 0.012 s | 100% |
| Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
| ismember | function | 2 | 0.010 s | 90.5% | |
| Self time (built-ins, overhead, etc.) | 0.001 s | 9.5% | |||
| Totals | 0.012 s | 100% |
| Total lines in function | 23 |
| Non-code lines (comments, blank lines) | 17 |
| Code lines (lines that can run) | 6 |
| Code lines that did run | 3 |
| Code lines that did not run | 3 |
| Coverage (did run/can run) | 50.00 % |
time | Calls | line | |
|---|---|---|---|
1 | function mustBeMember(A, B) | ||
2 | %MUSTBEMEMBER Validate value is member of specified set | ||
3 | % MUSTBEMEMBER(A, B) throws an error if A is not a member of B. | ||
4 | % MATLAB calls ismember(A,B) to determine if A is a member of B. | ||
5 | % | ||
6 | % Class support: | ||
7 | % All numeric classes, logical, char, cellstr | ||
8 | % MATLAB classes that define an ismember method. | ||
9 | % | ||
10 | % See also: ISMEMBER. | ||
11 | |||
12 | % Copyright 2016-2020 The MathWorks, Inc. | ||
13 | |||
0.012 | 2 | 14 | if ~all(ismember(A, B), "all") |
15 | throwAsCaller(... | ||
16 | createValidatorExceptionWithValue(... | ||
17 | createPrintableList(B),... | ||
18 | 'MATLAB:validators:mustBeMemberGenericText',... | ||
19 | 'MATLAB:validators:mustBeMember'... | ||
20 | )... | ||
21 | ); | ||
< 0.001 | 2 | 22 | end |
< 0.001 | 2 | 23 | end |
Other subfunctions in this file are not included in this listing.