In recent versions of matlab, the easiest would be to use detectImportOptions and override the relevant variable type to force it to char. However, R2015a predates detectImportOptions (introduced in R2016b). The only way for you to override the automatic type detection is to specify the 'Format' property in the readtable call. Unfortunately, that means you have to specify the format of all columns and know the exact number of columns rather than letting readtable work that out for you.
It would be something like:
data = readtable('yourfile', 'Format', '%f%f%s%s%f');
where '%s' forces the corresponding column to be read as text regardless of its content.
1 Comment
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/510330-readtable-interpreting-hex-as-scientific#comment_808516
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/510330-readtable-interpreting-hex-as-scientific#comment_808516
Sign in to comment.