TextVarOptsInputs>TextVarOptsInputs.setType (Calls: 15, Time: 0.001 s)
Generated 04-Jun-2021 04:11:08 using performance time.
class method in file C:\Program Files\MATLAB\R2020b\toolbox\shared\io\general\+matlab\+io\+internal\+shared\TextVarOptsInputs.m
Copy to new window for comparing multiple runs
Function Name | Function Type | Calls |
VarOptsInputs>VarOptsInputs.set.Type | class method | 15 |
Line Number | Code | Calls | Total Time | % Time | Time Plot |
46 | val = validatestring(val,{'cha... | 15 | 0.001 s | 78.7% | |
57 | end | 15 | 0.000 s | 0.4% | |
56 | end | 15 | 0.000 s | 0.1% | |
45 | try | 15 | 0.000 s | 0.1% | |
All other lines | 0.000 s | 20.8% | |||
Totals | 0.001 s | 100% |
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
validatestring | function | 15 | 0.001 s | 59.9% | |
Self time (built-ins, overhead, etc.) | 0.000 s | 40.1% | |||
Totals | 0.001 s | 100% |
Line number | Message |
48 | This import statement runs before any other code in function 'setType'. Consider placing it at the top of the function body. |
Total lines in function | 14 |
Non-code lines (comments, blank lines) | 3 |
Code lines (lines that can run) | 11 |
Code lines that did run | 4 |
Code lines that did not run | 7 |
Coverage (did run/can run) | 36.36 % |
time | Calls | line | |
---|---|---|---|
44 | function val = setType(obj,val) | ||
< 0.001 | 15 | 45 | try |
< 0.001 | 15 | 46 | val = validatestring(val,{'char','string'}); |
47 | catch ME | ||
48 | import matlab.io.internal.supportedTypeNames | ||
49 | if strcmp(ME.identifier,'MATLAB:unrecognizedStringChoice') && any(strcmp(supportedTypeNames,val)) | ||
50 | % additional information to help with debugging | ||
51 | newMsg = ['\n\n',getString(message('MATLAB:textio:io:Setdatatype')), '\n', ... | ||
52 | getString(message('MATLAB:textio:io:SetvartypeSyntax',obj.Name,val))]; | ||
53 | throw(MException('MATLAB:unrecognizedStringChoice',[ME.message, newMsg])); | ||
54 | end | ||
55 | throw(ME); | ||
< 0.001 | 15 | 56 | end |
< 0.001 | 15 | 57 | end |
Other subfunctions in this file are not included in this listing.