This is a static copy of a profile report

Home

processRawFill (Calls: 3, Time: 0.003 s)
Generated 04-Jun-2021 04:11:24 using performance time.
function in file C:\Program Files\MATLAB\R2020b\toolbox\shared\io\general\+matlab\+io\+internal\processRawFill.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
...eet>handleReplacement/processRulesnested function3
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
34
if iscategorical(varData)
30.001 s23.7%
23
if isdatetime(varData) &&a...
30.001 s23.3%
30
if isduration(varData) &&a...
30.001 s20.6%
5
if isnumeric(varData) &&am...
30.000 s4.6%
13
fill = {fill};
20.000 s4.1%
All other lines  0.001 s23.7%
Totals  0.003 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
isdatetimefunction30.000 s13.1%
isdurationfunction30.000 s10.8%
iscategoricalfunction30.000 s10.6%
Self time (built-ins, overhead, etc.)  0.002 s65.5%
Totals  0.003 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function60
Non-code lines (comments, blank lines)17
Code lines (lines that can run)43
Code lines that did run17
Code lines that did not run26
Coverage (did run/can run)39.53 %
Function listing
time 
Calls 
 line
   1 
function [fill,varData] = processRawFill(fill,varData)
   2 
% Process Raw Fillvalues into output type.
   3 

   4 
% Copyright 2019 MathWorks, Inc.
< 0.001 
      3 
   5
if isnumeric(varData) && isempty(fill) 
   6 
    fill = NaN;
< 0.001 
      3 
   7
end 
   8 

< 0.001 
      3 
   9
if iscell(varData) 
< 0.001 
      2 
  10
    if isnumeric(fill) 
< 0.001 
      2 
  11
        fill = ''; 
< 0.001 
      2 
  12
    end 
< 0.001 
      2 
  13
    fill = {fill}; 
< 0.001 
      3 
  14
end 
  15 

      3 
  16
if isstring(varData) 
  17 
    if isempty(fill)
  18 
        fill = missing;
  19 
    end
  20 
    fill = string(fill);
< 0.001 
      3 
  21
end 
  22 

< 0.001 
      3 
  23
if isdatetime(varData) && isnumeric(fill) 
  24 
    if numel(fill) == 2
  25 
        fill = complex(fill(1),fill(2));
  26 
    end
  27 
    fill = datetime.fromMillis(fill);
< 0.001 
      3 
  28
end 
  29 

< 0.001 
      3 
  30
if isduration(varData) && isnumeric(fill) 
  31 
    fill = milliseconds(fill);
< 0.001 
      3 
  32
end 
  33 

< 0.001 
      3 
  34
if iscategorical(varData) 
  35 
    % Combine the categories of the fill value with the
  36 
    if isempty(fill)
  37 
        fill = categorical(missing);
  38 
    end
  39 
    if ~iscategorical(fill)
  40 
        if ischar(fill)
  41 
            fill = {fill};
  42 
        end
  43 
        fill = categorical(fill);
  44 
    end
  45 
    % data array.
  46 
    cats = union(categories(varData),categories(fill),'stable');
  47 
    
  48 
    % If ordinal, both data and array need to have the
  49 
    % same categories in the same order, so reacreate
  50 
    % both with matching properties
  51 
    fill = categorical(fill,cats,...
  52 
        'Ordinal',isordinal(varData),...
  53 
        'Protected',isprotected(varData));
  54 
    varData = categorical(varData,cats,...
  55 
        'Ordinal',isordinal(varData),...
  56 
        'Protected',isprotected(varData));
  57 
    
< 0.001 
      3 
  58
end 
  59 

< 0.001 
      3 
  60
end 

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