readcellで要素の型を指定してcsvをインポートする方法を教えてください。
Show older comments
readcellでcsvファイルを読み込む際に、cell内に元の数値(9桁の16進数)が格納されず、"Inf"が格納されてしまい困っています。
現在書いたコードではd, eの後が数字のみのため、指数表記と認識されているようです。
正しく動作させる方法を教えてください。
filename = 'test.csv';
numVars = 3;
varTypes = {'char','char','char'};
delimiter = ',';
dataStartLine = 2;
opts = delimitedTextImportOptions('NumVariables',numVars, ...
'VariableTypes',varTypes,...
'Delimiter',delimiter,...
'DataLines', dataStartLine);
input_data = readcell(filename,opts);
Accepted Answer
More Answers (0)
Categories
Find more on データのインポートと解析 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!