This is a static copy of a profile report

Home

makeUniqueStrings>validateExclStrOrElemToChk (Calls: 8, Time: 0.001 s)
Generated 16-Jul-2020 17:09:55 using performance time.
subfunction in file /Applications/MATLAB_R2020a.app/toolbox/matlab/lang/+matlab/+lang/makeUniqueStrings.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
makeUniqueStringsfunction8
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
254
&& matlab.internal.dat...
80.000 s21.5%
252
if matlab.internal.datatypes.i...
80.000 s21.5%
253
|| ((isvector(exclStrOrElemToC...
80.000 s16.6%
256
exclStrOrElemToChk = string(ex...
80.000 s15.6%
283
end
80.000 s0.5%
All other lines  0.000 s24.3%
Totals  0.001 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
isCharStringfunction80.000 s2.3%
Self time (built-ins, overhead, etc.)  0.001 s97.7%
Totals  0.001 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function34
Non-code lines (comments, blank lines)12
Code lines (lines that can run)22
Code lines that did run6
Code lines that did not run16
Coverage (did run/can run)27.27 %
Function listing
time 
Calls 
 line
 250 
function exclStrOrElemToChk = validateExclStrOrElemToChk(exclStrOrElemToChk, inputStr)
 251 
% Validate EXCLUDEDSTRINGS or ELEMENTSTOCHECK.
< 0.001 
      8 
 252
if matlab.internal.datatypes.isCharString(exclStrOrElemToChk) ... 
      8 
 253
        || ((isvector(exclStrOrElemToChk) || isempty(exclStrOrElemToChk)) ... 
      8 
 254
             && matlab.internal.datatypes.isCharStrings(exclStrOrElemToChk,true)) 
 255 
    % exclStrOrElemToChk is a (potentially empty) char vector or cellstr.
< 0.001 
      8 
 256
    exclStrOrElemToChk = string(exclStrOrElemToChk); 
 257 
elseif isnumeric(exclStrOrElemToChk) && isequaln(floor(exclStrOrElemToChk),exclStrOrElemToChk)
 258 
    % Assume exclStrOrElemToChk is checkElements intended to be a range or
 259 
    % linear indices into STRINGS.
 260 
    exclStrOrElemToChk = reshape(exclStrOrElemToChk, 1, []);
 261 
    if isempty(exclStrOrElemToChk)
 262 
        % Nothing to check for uniqueness.
 263 
        exclStrOrElemToChk = false(size(inputStr));
 264 
    elseif min(exclStrOrElemToChk) <= 0 || ~isreal(exclStrOrElemToChk) ...
 265 
           || any(isnan(exclStrOrElemToChk))
 266 
        % Elements of the range must be positive.
 267 
        error(message('MATLAB:makeUniqueStrings:NonPositiveRange'));
 268 
    elseif max(exclStrOrElemToChk) > numel(inputStr)
 269 
        % checkElements exceed the range of STRINGS number of elements.
 270 
        error(message('MATLAB:makeUniqueStrings:OutOfBoundRange'));
 271 
    end
 272 
elseif islogical(exclStrOrElemToChk)
 273 
    % Assume exclStrOrElemToChk is checkElements when exclStrOrElemToChk is
 274 
    % a logical array; the logical indices array must be the same length as
 275 
    % STRINGS.
 276 
    if ~isequal(numel(exclStrOrElemToChk), numel(inputStr))
 277 
        error(message('MATLAB:makeUniqueStrings:BadLengthLogicalMask'));
 278 
    end
 279 
elseif ~isstring(exclStrOrElemToChk)
 280 
    % Though they are useless here, <missing> string values are allowed.
 281 
    error(message('MATLAB:makeUniqueStrings:InvalidFirstOptionalArg'));
< 0.001 
      8 
 282
end 
< 0.001 
      8 
 283
end 

Other subfunctions in this file are not included in this listing.