FastVarOpts>FastVarOpts.FastVarOpts (Calls: 2, Time: 0.003 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\FastVarOpts.m
Copy to new window for comparing multiple runs
Function Name | Function Type | Calls |
...ons>ImportOptions.set.NumVariables | class method | 2 |
Line Number | Code | Calls | Total Time | % Time | Time Plot |
25 | Types = repmat({'char'},n,1); | 2 | 0.002 s | 47.8% | |
23 | mustBeNonnegative(n); | 2 | 0.001 s | 15.2% | |
52 | obj.OptionsStruct.Options = Op... | 2 | 0.000 s | 6.7% | |
42 | Options = repmat({struct},n,1)... | 2 | 0.000 s | 5.5% | |
50 | obj.OptionsStruct.Types = Type... | 2 | 0.000 s | 5.2% | |
All other lines | 0.001 s | 19.6% | |||
Totals | 0.003 s | 100% |
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
repmat | function | 6 | 0.001 s | 40.0% | |
mustBeNonnegative | function | 2 | 0.000 s | 8.2% | |
Self time (built-ins, overhead, etc.) | 0.002 s | 51.8% | |||
Totals | 0.003 s | 100% |
Total lines in function | 32 |
Non-code lines (comments, blank lines) | 8 |
Code lines (lines that can run) | 24 |
Code lines that did run | 11 |
Code lines that did not run | 13 |
Coverage (did run/can run) | 45.83 % |
time | Calls | line | |
---|---|---|---|
22 | function obj = FastVarOpts(n,Types) | ||
< 0.001 | 2 | 23 | mustBeNonnegative(n); |
< 0.001 | 2 | 24 | if nargin < 2 |
0.002 | 2 | 25 | Types = repmat({'char'},n,1); |
26 | else | ||
27 | t = matlab.io.internal.supportedTypeNames(); | ||
28 | t{end + 1} = 'hexadecimal'; | ||
29 | t{end + 1} = 'binary'; | ||
30 | tf = any(string(Types(:))==t,2); | ||
31 | if ~all(tf) | ||
32 | error(message('MATLAB:textio:io:UnsupportedConversionType',Types{find(~tf,1)})); | ||
33 | end | ||
34 | Types = Types(:); | ||
35 | n = numel(Types); | ||
36 | if ~isempty(Types) | ||
37 | obj.NeedsUniformCheck = ~all(strcmp(Types,Types{1})); | ||
38 | end | ||
< 0.001 | 2 | 39 | end |
< 0.001 | 2 | 40 | Names = repmat({''},n,1); |
41 | |||
< 0.001 | 2 | 42 | Options = repmat({struct},n,1); |
43 | |||
44 | % OptionsStruct is a struct with three fields: Names, Types, | ||
45 | % and Options. The names and types fields are cell arrays | ||
46 | % containing the names and types of import variables, | ||
47 | % respectively. Options is a cell array of structs that | ||
48 | % describe the import options for each variable. | ||
< 0.001 | 2 | 49 | obj.OptionsStruct = struct(); |
< 0.001 | 2 | 50 | obj.OptionsStruct.Types = Types; |
< 0.001 | 2 | 51 | obj.OptionsStruct.Names = Names; |
< 0.001 | 2 | 52 | obj.OptionsStruct.Options = Options; |
< 0.001 | 2 | 53 | end |
Other subfunctions in this file are not included in this listing.