This is a static copy of a profile report

Home

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

Parents (calling functions)

Function NameFunction TypeCalls
...hImportOptionsSpreadsheet.executeImplclass method1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
16
if length(s) == 1
10.000 s27.5%
24
end
10.000 s18.4%
15
s = upper(s);
10.000 s14.7%
28
end
10.000 s0.2%
17
d = s(1) -'A' + 1;
10.000 s0.0%
All other lines  0.000 s39.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 function28
Non-code lines (comments, blank lines)13
Code lines (lines that can run)15
Code lines that did run7
Code lines that did not run8
Coverage (did run/can run)46.67 %
Function listing
time 
Calls 
 line
   1 
function d = columnNumber(s)
   2 
    %   COLUMNNUMBER(S) returns the column number of S which is a spreadsheeet
   3 
    %   column letter 'A'..'Z', 'AA','AB'...'AZ', and so on.
   4 
    %
   5 
    %   Examples:
   6 
    %       base27dec('A') returns 1
   7 
    %       base27dec('Z') returns 26
   8 
    %       base27dec('IV') returns 256
   9 
    %
  10 
    % See also matlab.io.spreadsheet.internal.columnLetter
  11 
    
  12 
    %   Copyright 2014-2018 The MathWorks, Inc.
  13 
    
      1 
  14
    try 
< 0.001 
      1 
  15
        s = upper(s); 
< 0.001 
      1 
  16
        if length(s) == 1 
< 0.001 
      1 
  17
            d = s(1) -'A' + 1; 
  18 
        else
  19 
            cumulative = sum(26.^(1:numel(s)-1));
  20 
            indexes_fliped = 1 + s - 'A';
  21 
            indexes = fliplr(indexes_fliped);
  22 
            indexes_in_cells = mat2cell(indexes, 1, ones(1,numel(indexes))); %#ok<MMTC>
  23 
            d = cumulative + sub2ind(repmat(26, 1,numel(s)), indexes_in_cells{:});
< 0.001 
      1 
  24
        end 
  25 
    catch
  26 
        d = NaN;
      1 
  27
    end 
< 0.001 
      1 
  28
end 

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