csvwriteFast:将数值数据/矩阵快速写入 csv/文本文件-matlab开发

时间:2021-05-31 01:00:44
【文件属性】:
文件名称:csvwriteFast:将数值数据/矩阵快速写入 csv/文本文件-matlab开发
文件大小:417B
文件格式:ZIP
更新时间:2021-05-31 01:00:44
matlab 用法: csvwriteFast( 文件名、值、格式) 速度: >> r = randn( 1e5, 2 ); >> tic, csvwrite( 'r.csv', r ), toc 经过的时间是 3.945658 秒。 >> tic, csvwriteFast( 'r.csv', r, '%f,%f' ), toc 经过的时间是 0.302832 秒。 另一个优点是能够分别为每一列指定数字格式 我注意到这种方法在列数较少的矩阵上更重要。 例如,它写入 10 列矩阵的速度仅比 csvwrite 快 3 倍,而在上面的示例中(2 列),该因子超过 13。
【文件预览】:
csvwriteFast.zip

网友评论