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
Function Name | Function Type | Calls |
tabular.setProperty | function | 2 |
Line Number | Code | Calls | Total Time | % Time | Time Plot |
489 | elseif ~isempty(newDescrs) &am... | 2 | 0.000 s | 22.8% | |
504 | newDescrs = strtrim(newDescrs(... | 2 | 0.000 s | 14.7% | |
487 | if ~matlab.internal.datatypes.... | 2 | 0.000 s | 14.6% | |
505 | obj.hasDescrs = true; | 2 | 0.000 s | 10.2% | |
507 | obj.descrs = newDescrs; | 2 | 0.000 s | 9.5% | |
All other lines | 0.000 s | 28.3% | |||
Totals | 0.001 s | 100% |
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
isText | function | 2 | 0.000 s | 2.3% | |
Self time (built-ins, overhead, etc.) | 0.001 s | 97.7% | |||
Totals | 0.001 s | 100% |
Line number | Message |
Total lines in function | 24 |
Non-code lines (comments, blank lines) | 3 |
Code lines (lines that can run) | 21 |
Code lines that did run | 15 |
Code lines that did not run | 6 |
Coverage (did run/can run) | 71.43 % |
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.