循环需要很长时间才能执行。有没有更快的方法来处理加载的文件?
a = fileread ("C:/Backup/Thermo Backups/2018-05-17.txt");
d = strsplit (a, "\n");
for i = 1 : length(d)
e (i , :) = strsplit ( d{i} );
endfor
f = cellfun(@str2num, e)
数据样本:
2 36.5333 43 43 43 43 68 0 0
2.5 36.5333 43 43 43 43 68 0 0
3 36.6667 43 43 43 43 68 0 0
3.5 36.6667 43 43 43 43 68 0 0
4 36.6667 43 43 43 43 68 0 0