This is a static copy of a profile report

Home

varNamesDim>varNamesDim.setDescrs (Calls: 2, Time: 0.001 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\varNamesDim.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
tabular.setPropertyfunction2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
489
elseif ~isempty(newDescrs) &am...
20.000 s22.8%
504
newDescrs = strtrim(newDescrs(...
20.000 s14.7%
487
if ~matlab.internal.datatypes....
20.000 s14.6%
505
obj.hasDescrs = true;
20.000 s10.2%
507
obj.descrs = newDescrs;
20.000 s9.5%
All other lines  0.000 s28.3%
Totals  0.001 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
isTextfunction20.000 s2.3%
Self time (built-ins, overhead, etc.)  0.001 s97.7%
Totals  0.001 s100% 
Code Analyzer results
Line numberMessage
Coverage results
Show coverage for parent directory
Total lines in function24
Non-code lines (comments, blank lines)3
Code lines (lines that can run)21
Code lines that did run15
Code lines that did not run6
Coverage (did run/can run)71.43 %
Function listing
time 
Calls 
 line
 485 
        function obj = setDescrs(obj,newDescrs,noErrorCheck)
< 0.001 
      2 
 486
            if (nargin<3) || (nargin==3 && ~noErrorCheck) 
< 0.001 
      2 
 487
                if ~matlab.internal.datatypes.isText(newDescrs,true) % require a cell array, allow empty character vectors in that cell array 
 488 
                    error(message('MATLAB:table:InvalidVarDescr'));
< 0.001 
      2 
 489
                elseif ~isempty(newDescrs) && numel(newDescrs) ~= obj.length 
 490 
                    error(message('MATLAB:table:IncorrectNumberOfVarDescrs'));
< 0.001 
      2 
 491
                end 
< 0.001 
      2 
 492
            end 
 493 
            
< 0.001 
      2 
 494
            if isstring(newDescrs) 
 495 
                newDescrs = cellstr(newDescrs);
< 0.001 
      2 
 496
            end 
< 0.001 
      2 
 497
            if obj.length == 0 && isequal(size(newDescrs),[1 0]) 
 498 
                % leave a 1x0 cell alone for a table with no vars
 499 
                obj.hasDescrs = true;
< 0.001 
      2 
 500
            elseif isempty(newDescrs) 
 501 
                newDescrs = {}; % for cosmetics
 502 
                obj.hasDescrs = false;
      2 
 503
            else 
< 0.001 
      2 
 504
                newDescrs = strtrim(newDescrs(:))'; % a row vector 
< 0.001 
      2 
 505
                obj.hasDescrs = true; 
< 0.001 
      2 
 506
            end 
< 0.001 
      2 
 507
            obj.descrs = newDescrs; 
< 0.001 
      2 
 508
        end 

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