This is a static copy of a profile report

Home

tabular.tabular>tabular.countVarInputs (Calls: 8, Time: 0.002 s)
Generated 04-Jun-2021 04:11:14 using performance time.
class method in file C:\Program Files\MATLAB\R2020b\toolbox\matlab\datatypes\tabular\@tabular\tabular.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
table.table>table.tableclass method8
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
342
if isCharString(arg) % Matches...
80.001 s53.4%
339
while argCnt < length(args)
80.000 s7.5%
341
arg = args{argCnt};
80.000 s5.9%
365
end % while argCnt < numArg...
60.000 s4.9%
345
break
20.000 s4.6%
All other lines  0.001 s23.7%
Totals  0.002 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
isCharStringfunction80.001 s23.4%
Self time (built-ins, overhead, etc.)  0.002 s76.6%
Totals  0.002 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)7
Code lines (lines that can run)27
Code lines that did run19
Code lines that did not run8
Coverage (did run/can run)70.37 %
Function listing
time 
Calls 
 line
 333 
        function [numVars, numRows] = countVarInputs(args,StringParamNameNotSupportedErrID)
 334 
        %COUNTVARINPUTS Count the number of data vars from a tabular input arg list
 335 
            import matlab.internal.datatypes.isCharString
< 0.001 
      8 
 336
            argCnt = 0; 
< 0.001 
      8 
 337
            numVars = 0; 
< 0.001 
      8 
 338
            numRows = 0; 
< 0.001 
      8 
 339
            while argCnt < length(args) 
< 0.001 
      8 
 340
                argCnt = argCnt + 1; 
< 0.001 
      8 
 341
                arg = args{argCnt}; 
  0.001 
      8 
 342
                if isCharString(arg) % Matches any character row vector (including ''), not just a parameter name 
 343 
                    % Put that one back and start processing param name/value pairs
< 0.001 
      2 
 344
                    argCnt = argCnt - 1; %#ok<NASGU> 
< 0.001 
      2 
 345
                    break 
< 0.001 
      6 
 346
                elseif isa(arg,'function_handle') 
 347 
                    throwAsCaller(MException(message('MATLAB:table:FunAsVariable')));
< 0.001 
      6 
 348
                else % an array that will become a variable in t 
< 0.001 
      6 
 349
                    numVars = numVars + 1; 
< 0.001 
      6 
 350
                end 
< 0.001 
      6 
 351
                numRows_j = size(arg,1); 
< 0.001 
      6 
 352
                if argCnt == 1 
< 0.001 
      6 
 353
                    numRows = numRows_j; 
 354 
                elseif ~isequal(numRows_j,numRows)
 355 
                    ME = MException(message('MATLAB:table:UnequalVarLengths'));
 356 
                    if isstring(arg) && isscalar(arg) && numRows > 1
 357 
                        % A scalar string following inputs with more than one row
 358 
                        % is likely intended as a parameter name, give a helpful
 359 
                        % error.
 360 
                        cause = MException(message(StringParamNameNotSupportedErrID,arg));
 361 
                        ME = ME.addCause(cause);
 362 
                    end
 363 
                    throwAsCaller(ME);
< 0.001 
      6 
 364
                end 
< 0.001 
      6 
 365
            end % while argCnt < numArgs, processing individual vars 
< 0.001 
      8 
 366
        end 

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