time | Calls | line |
---|
| | 81 | function val = setType(obj,val)
|
| | 82 | import matlab.io.internal.supportedTypeNames
|
< 0.001 | 15 | 83 | val = convertCharsToStrings(val);
|
< 0.001 | 15 | 84 | if ~(isstring(val) && isscalar(val)) ...
|
| 15 | 85 | || ~any(strcmp(val,...
|
| | 86 | {'double','single',...
|
| | 87 | 'int8','uint8',...
|
| | 88 | 'int16','uint16',...
|
| | 89 | 'int32','uint32',...
|
| | 90 | 'int64','uint64','auto'}))
|
| | 91 | if any(strcmp(supportedTypeNames,val))
|
| | 92 | newMsg = [getString(message('MATLAB:textio:io:NumericType')), ...
|
| | 93 | '\n\n',getString(message('MATLAB:textio:io:Setdatatype')), '\n', ...
|
| | 94 | getString(message('MATLAB:textio:io:SetvartypeSyntax',obj.Name,val))];
|
| | 95 | throw(MException('MATLAB:textio:io:StaticOptionsType',newMsg));
|
| | 96 | end
|
| | 97 | error(message('MATLAB:textio:io:NumericType'));
|
< 0.001 | 15 | 98 | end
|
< 0.001 | 15 | 99 | val = char(val);
|
< 0.001 | 15 | 100 | end
|
Other subfunctions in this file are not included in this listing.