validateNVPairs (Calls: 2, Time: 0.002 s)
Generated 04-Jun-2021 04:11:05 using performance time.
function in file C:\Program Files\MATLAB\R2020b\toolbox\shared\io\general\+matlab\+io\+internal\+validators\validateNVPairs.m
Copy to new window for comparing multiple runs
Function Name | Function Type | Calls |
...ExecutableFunction.validateAndExecute | class method | 2 |
Line Number | Code | Calls | Total Time | % Time | Time Plot |
17 | for v = varargin(1:2:end) | 2 | 0.001 s | 32.4% | |
18 | if ~isNonEmptyScalarText(v{1}) | 1 | 0.000 s | 29.7% | |
21 | end | 1 | 0.000 s | 5.4% | |
22 | end | 2 | 0.000 s | 0.2% | |
13 | if mod(nargin,2)~=0 | 2 | 0.000 s | 0.0% | |
All other lines | 0.001 s | 32.3% | |||
Totals | 0.002 s | 100% |
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
validateNVPairs>isNonEmptyScalarText | subfunction | 1 | 0.000 s | 20.0% | |
Self time (built-ins, overhead, etc.) | 0.001 s | 80.0% | |||
Totals | 0.002 s | 100% |
Total lines in function | 22 |
Non-code lines (comments, blank lines) | 13 |
Code lines (lines that can run) | 9 |
Code lines that did run | 7 |
Code lines that did not run | 2 |
Coverage (did run/can run) | 77.78 % |
time | Calls | line | |
---|---|---|---|
1 | function validateNVPairs(varargin) | ||
2 | %Common checks for name-value pair validitiy | ||
3 | % matlab.io.internal.validators.validateNVPairs(Name1,Value1,...) | ||
4 | % will error if the number of arguments is odd--I.e. when there aren't | ||
5 | % values for each of the names--and when any of the names are not | ||
6 | % non-empty scalar text elements. | ||
7 | % | ||
8 | % See Also matlab.io.internal.validators.FunctionInterface, | ||
9 | % matlab.io.internal.validators.struct2args | ||
10 | |||
11 | % Copyright 2018 The MathWorks, Inc. | ||
12 | |||
< 0.001 | 2 | 13 | if mod(nargin,2)~=0 |
14 | error(message('MATLAB:textio:textio:OddNumberNVPairs')); | ||
< 0.001 | 2 | 15 | end |
16 | |||
< 0.001 | 2 | 17 | for v = varargin(1:2:end) |
< 0.001 | 1 | 18 | if ~isNonEmptyScalarText(v{1}) |
19 | error(message('MATLAB:InputParser:ParamMustBeChar')); | ||
< 0.001 | 1 | 20 | end |
< 0.001 | 1 | 21 | end |
< 0.001 | 2 | 22 | end |
Other subfunctions in this file are not included in this listing.