readcellで要素の型を指定してcsvをインポートする方法を教えてください。
Ältere Kommentare anzeigen
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);
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu データのインポートと解析 finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!