tabular.matchPropertyName (Calls: 18, Time: 0.002 s)
Generated 04-Jun-2021 04:11:11 using performance time.
function in file C:\Program Files\MATLAB\R2020b\toolbox\matlab\datatypes\tabular\@tabular\matchPropertyName.m
Copy to new window for comparing multiple runs
Function Name | Function Type | Calls |
tabular.setProperty | function | 12 |
tabular.getProperty | function | 6 |
Line Number | Code | Calls | Total Time | % Time | Time Plot |
6 | if ~matlab.internal.datatypes.... | 18 | 0.001 s | 48.9% | |
13 | j = find(matches(propertyNames... | 16 | 0.000 s | 12.9% | |
21 | name = propertyNames{j}; | 18 | 0.000 s | 9.8% | |
11 | j = find(strncmpi(name,propert... | 2 | 0.000 s | 9.8% | |
10 | if nargin < 2 || ~exact | 18 | 0.000 s | 7.9% | |
All other lines | 0.000 s | 10.8% | |||
Totals | 0.002 s | 100% |
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
isScalarText | function | 18 | 0.000 s | 28.9% | |
Self time (built-ins, overhead, etc.) | 0.001 s | 71.1% | |||
Totals | 0.002 s | 100% |
Total lines in function | 21 |
Non-code lines (comments, blank lines) | 7 |
Code lines (lines that can run) | 14 |
Code lines that did run | 11 |
Code lines that did not run | 3 |
Coverage (did run/can run) | 78.57 % |
time | Calls | line | |
---|---|---|---|
1 | function name = matchPropertyName(name,propertyNames,exact) | ||
2 | %MATCHPROPERTYNAME Validate a table property name. | ||
3 | |||
4 | % Copyright 2012-2019 The MathWorks, Inc. | ||
5 | |||
< 0.001 | 18 | 6 | if ~matlab.internal.datatypes.isScalarText(name) |
7 | error(message('MATLAB:table:InvalidPropertyName')); | ||
< 0.001 | 18 | 8 | end |
9 | |||
< 0.001 | 18 | 10 | if nargin < 2 || ~exact |
< 0.001 | 2 | 11 | j = find(strncmpi(name,propertyNames,length(name))); |
< 0.001 | 16 | 12 | else |
< 0.001 | 16 | 13 | j = find(matches(propertyNames,name)); |
< 0.001 | 18 | 14 | end |
< 0.001 | 18 | 15 | if isempty(j) |
16 | error(message('MATLAB:table:UnknownProperty', name)); | ||
< 0.001 | 18 | 17 | elseif ~isscalar(j) |
18 | error(message('MATLAB:table:AmbiguousProperty', name)); | ||
< 0.001 | 18 | 19 | end |
20 | |||
< 0.001 | 18 | 21 | name = propertyNames{j}; |
Other subfunctions in this file are not included in this listing.