detectTypes>getDominantType (Calls: 2, Time: 0.001 s)
Generated 04-Jun-2021 04:11:09 using performance time.
subfunction in file C:\Program Files\MATLAB\R2020b\toolbox\matlab\io\spreadsheet\+matlab\+io\+spreadsheet\+internal\detectTypes.m
Copy to new window for comparing multiple runs
Function Name | Function Type | Calls |
detectTypes | function | 2 |
Line Number | Code | Calls | Total Time | % Time | Time Plot |
90 | typeIDs(typeIDs == enum.BLANK ... | 2 | 0.000 s | 42.0% | |
91 | dominantType = mode(typeIDs((m... | 2 | 0.000 s | 40.6% | |
92 | dominantType(isnan(dominantTyp... | 2 | 0.000 s | 0.6% | |
93 | end | 2 | 0.000 s | 0.1% | |
88 | typeIDs = double(typeIDs); | 2 | 0.000 s | 0.0% | |
All other lines | 0.000 s | 16.8% | |||
Totals | 0.001 s | 100% |
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
mode | function | 2 | 0.000 s | 13.0% | |
Self time (built-ins, overhead, etc.) | 0.001 s | 87.0% | |||
Totals | 0.001 s | 100% |
Total lines in function | 10 |
Non-code lines (comments, blank lines) | 5 |
Code lines (lines that can run) | 5 |
Code lines that did run | 5 |
Code lines that did not run | 0 |
Coverage (did run/can run) | 100.00 % |
time | Calls | line | |
---|---|---|---|
84 | function dominantType = getDominantType(typeIDs,emptyType,metaRows,enum) | ||
85 | % An entirely empty column should be number or string dependent on | ||
86 | % whether the function call is made from readtable/datastore, or | ||
87 | % detectImportOptions, respectively | ||
< 0.001 | 2 | 88 | typeIDs = double(typeIDs); |
89 | % Ignore all these | ||
< 0.001 | 2 | 90 | typeIDs(typeIDs == enum.BLANK | typeIDs == enum.ERROR | typeIDs == enum.EMPTY) = NaN; |
< 0.001 | 2 | 91 | dominantType = mode(typeIDs((metaRows+1):end,:),1); |
< 0.001 | 2 | 92 | dominantType(isnan(dominantType)) = emptyType; |
< 0.001 | 2 | 93 | end |