This is a static copy of a profile report

Home

tabularDimension>tabularDimension.assignLabels (Calls: 24, Time: 0.002 s)
Generated 04-Jun-2021 04:11:16 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
...t;varNamesDim.validateAndAssignLabelsclass method14
metaDim>metaDim.validateAndAssignLabelsclass method3
...t;rowNamesDim.validateAndAssignLabelsclass method7
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
392
obj.labels = newLabels;
240.001 s21.8%
391
obj.hasLabels = true;
240.001 s21.7%
386
if isvector(newLabels)
240.000 s18.6%
388
if numel(newLabels) ~= obj.len...
240.000 s14.3%
385
if fullAssignment
240.000 s5.2%
All other lines  0.000 s18.4%
Totals  0.002 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function23
Non-code lines (comments, blank lines)5
Code lines (lines that can run)18
Code lines that did run9
Code lines that did not run9
Coverage (did run/can run)50.00 %
Function listing
time 
Calls 
 line
 384 
        function obj = assignLabels(obj,newLabels,fullAssignment,indices)
< 0.001 
     24 
 385
            if fullAssignment 
< 0.001 
     24 
 386
                if isvector(newLabels) 
 387 
                    % The number of new labels has to match what's being assigned to.
< 0.001 
     24 
 388
                    if numel(newLabels) ~= obj.length 
 389 
                        obj.throwIncorrectNumberOfLabels();
< 0.001 
     24 
 390
                    end 
< 0.001 
     24 
 391
                    obj.hasLabels = true; 
< 0.001 
     24 
 392
                    obj.labels = newLabels; 
 393 
                else % a 0x0
 394 
                    % Full assignment of a 0x0 clears out the existing labels, if allowed above by
 395 
                    % the subclass's validateLabels.
 396 
                    obj.labels = newLabels([]); % force a 0x0, for cosmetics
 397 
                    obj.hasLabels = false;
< 0.001 
     24 
 398
                end 
 399 
            else % subscripted assignment
 400 
                % The number of new labels has to match what's being assigned to.
 401 
                if numel(newLabels) ~= numel(indices)
 402 
                    obj.throwIncorrectNumberOfLabelsPartial();
 403 
                end
 404 
                obj.labels(indices) = newLabels;
< 0.001 
     24 
 405
            end 
< 0.001 
     24 
 406
        end 

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