This is a static copy of a profile report

Home

TreatAsMissingInput>TreatAsMissingInput.TreatAsMissingInput (Calls: 45, Time: 0.000 s)
Generated 04-Jun-2021 04:11:10 using performance time.
class method in file C:\Program Files\MATLAB\R2020b\toolbox\shared\io\general\+matlab\+io\+internal\+shared\TreatAsMissingInput.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
...Inputs>VarOptsInputs.VarOptsInputsclass method45
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
1
classdef TreatAsMissingInput &...
450.000 s2.8%
All other lines  0.000 s97.2%
Totals  0.000 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function47
Non-code lines (comments, blank lines)32
Code lines (lines that can run)15
Code lines that did run1
Code lines that did not run14
Coverage (did run/can run)6.67 %
Function listing
time 
Calls 
 line
< 0.001 
     45 
   1
classdef TreatAsMissingInput < matlab.io.internal.FunctionInterface 
   2 
    %TREATASMISSING 
   3 
    
   4 
    % Copyright 2018 MathWorks, Inc.
   5 
    properties (Parameter)
   6 
        %TREATASMISSING
   7 
        %   A cell array of character vectors which are to be treated as missing
   8 
        %   indicators for the variable when importing text data. When a missing
   9 
        %   indicator is found, the MissingRule is used to determine the
  10 
        %   appropriate action.
  11 
        %
  12 
        %   Example, set the options to replace occurrences of 'NA' with '-':
  13 
        %
  14 
        %       % when ImportOptions/MissingRule = 'fill'
  15 
        %       opts = matlab.io.TextVariableImportOptions();
  16 
        %       opts.TreatAsMissing = {'NA'};
  17 
        %       opts.FillValue = '-';
  18 
        %
  19 
        %   When importing, any instances of 'NA' will be replaced with '-'
  20 
        %
  21 
        % See also matlab.io.VariableImportOptions
  22 
        %   matlab.io.spreadsheet.SpreadsheetImportOptions/MissingRule
  23 
        %   matlab.io.spreadsheet.SpreadsheetImportOptions/ImportErrorRule
  24 
        %   matlab.io.VariableImportOptions/FillValue
  25 
        TreatAsMissing = {};
  26 
    end
  27 
    
  28 
    methods
  29 
        function obj = set.TreatAsMissing(obj,rhs)
  30 
            if isnumeric(rhs) && isequal(rhs,[])
  31 
                rhs = strings(0);
  32 
            else
  33 
                rhs = convertCharsToStrings(rhs);
  34 
            end
  35 
            if ~isstring(rhs) || any(ismissing(rhs),'all')
  36 
                error(message('MATLAB:datastoreio:tabulartextdatastore:invalidTreatAsMissing'))
  37 
            end
  38 
            if isempty(rhs)
  39 
                obj.TreatAsMissing = {};
  40 
            else
  41 
                obj.TreatAsMissing = cellstr(rhs);
  42 
            end
  43 
        end     
  44 
    end
  45 
end
  46 

  47