This is a static copy of a profile report

Home

tabularDimension>tabularDimension.validateNativeSubscripts (Calls: 5668, Time: 0.152 s)
Generated 04-Jun-2021 04:11:13 using performance time.
class method in file C:\Program Files\MATLAB\R2020b\toolbox\matlab\datatypes\tabular\+matlab\+internal\+tabular\+private\tabularDimension.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
...mension>tabularDimension.subs2indsclass method5668
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
422
elseif isText(subscripts,true)...
56680.075 s49.4%
435
indFirstMatch = find(strcmp(su...
56680.042 s27.8%
432
indices = zeros(size(subscript...
56680.013 s8.5%
440
end
56680.008 s5.0%
433
labs = obj.labels;
56680.003 s2.0%
All other lines  0.011 s7.3%
Totals  0.152 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
isTextfunction56680.054 s35.3%
Self time (built-ins, overhead, etc.)  0.098 s64.7%
Totals  0.152 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function32
Non-code lines (comments, blank lines)9
Code lines (lines that can run)23
Code lines that did run15
Code lines that did not run8
Coverage (did run/can run)65.22 %
Function listing
time 
Calls 
 line
 409 
        function [subscripts,indices] = validateNativeSubscripts(obj,subscripts)
 410 
            import matlab.internal.datatypes.isText
 411 

< 0.001 
   5668 
 412
            subscripts = convertStringsToChars(subscripts); 
 413 
            
 414 
            % Default behavior assumes the labels are names, subclasses with
 415 
            % non-name labels need to overload.
< 0.001 
   5668 
 416
            if ischar(subscripts) % already weeded out ':' 
 417 
                if isrow(subscripts)
 418 
                    subscripts = { subscripts };
 419 
                else
 420 
                    obj.throwInvalidLabel();
 421 
                end
  0.075 
   5668 
 422
            elseif isText(subscripts,true) % require a cell array or string array, don't allow empty character vectors in it 
 423 
                % Don't allow scalar missing string or "", and handle it the
 424 
                % same as ''.
< 0.001 
   5668 
 425
                if isstring(subscripts) && isscalar(subscripts) && strlength(subscripts) < 1  
 426 
                    obj.throwInvalidLabel();
< 0.001 
   5668 
 427
                end 
 428 
            else
 429 
                obj.throwInvalidSubscripts();
< 0.001 
   5668 
 430
            end 
 431 
            
  0.013 
   5668 
 432
            indices = zeros(size(subscripts)); 
  0.003 
   5668 
 433
            labs = obj.labels; 
< 0.001 
   5668 
 434
            for i = 1:numel(indices) 
  0.042 
   5668 
 435
                indFirstMatch = find(strcmp(subscripts{i},labs), 1); 
< 0.001 
   5668 
 436
                if indFirstMatch 
< 0.001 
   5668 
 437
                    indices(i) = indFirstMatch; 
< 0.001 
   5668 
 438
                end 
< 0.001 
   5668 
 439
            end 
  0.008 
   5668 
 440
        end 

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