This is a static copy of a profile report

Home

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

Parents (calling functions)

Function NameFunction TypeCalls
...ts>SpreadsheetInputs.set.DataRangeclass method2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
237
rhs = validateRange(rhs,'DataR...
20.007 s93.3%
204
[nrows, ncols] = size(rhs);
20.000 s3.9%
239
end
20.000 s0.0%
206
if (~ischar(rhs) && nc...
20.000 s0.0%
234
elseif isempty(rhs)
20.000 s0.0%
All other lines  0.000 s2.8%
Totals  0.007 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
...t;SpreadsheetImportOptions.getNumVarsclass method20.006 s80.7%
SpreadsheetInputs>validateRangeclass method20.001 s9.1%
Self time (built-ins, overhead, etc.)  0.001 s10.2%
Totals  0.007 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function40
Non-code lines (comments, blank lines)7
Code lines (lines that can run)33
Code lines that did run8
Code lines that did not run25
Coverage (did run/can run)24.24 %
Function listing
time 
Calls 
 line
 200 
        function rhs = validateDataRange(obj,rhs)
 201 
        % Determine how DataRange was specified and then delegate to
 202 
        % the appropriate validators
< 0.001 
      2 
 203
        rhs = convertStringsToChars(rhs); 
< 0.001 
      2 
 204
        [nrows, ncols] = size(rhs); 
 205 
        
< 0.001 
      2 
 206
        if (~ischar(rhs) && ncols > 1) || nrows > 1 
 207 
            temprhs = rhs;
 208 
            if iscellstr(rhs)
 209 
                for i = 1:nrows
 210 
                    type = ...
 211 
                        matlab.io.spreadsheet.internal.validateRange(rhs{i});
 212 
                    if ~strcmp(type, 'row-only')
 213 
                        error(message('MATLAB:spreadsheet:importoptions:RowOnlyRanges'));
 214 
                    end
 215 
                end
 216 
                % convert the intervals to numeric for validation
 217 
                temprhs = str2double(split(string(rhs),':'));
 218 
            elseif ~isnumeric(rhs)
 219 
                error(message('MATLAB:spreadsheet:importoptions:InvalidDataRange'));
 220 
            else
 221 
                % Convert to double
 222 
                rhs = double(rhs);
 223 
            end
 224 
            try
 225 
                % validate the 'DataLines' syntax
 226 
                matlab.io.internal.validators.validateLineIntervals(temprhs,'DataRange');
 227 
            catch ME
 228 
                if strcmp(ME.identifier,'MATLAB:textio:io:InvalidDataLines')
 229 
                    error(message('MATLAB:spreadsheet:importoptions:InvalidDataRange'));
 230 
                else
 231 
                    throw(ME);
 232 
                end
 233 
            end
< 0.001 
      2 
 234
        elseif isempty(rhs) 
 235 
            error(message('MATLAB:spreadsheet:importoptions:InvalidDataRange'));
      2 
 236
        else 
  0.007 
      2 
 237
            rhs = validateRange(rhs,'DataRange',@NumVars,obj.getNumVars()); 
< 0.001 
      2 
 238
        end 
< 0.001 
      2 
 239
        end 

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