如何在Octave中有效地从csv读取大型矩阵 [英] How to read large matrix from a csv efficiently in Octave

查看:543
本文介绍了如何在Octave中有效地从csv读取大型矩阵的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有许多关于Octave dlmread性能下降的报告.我希望此问题已在3.2.4中修复,但是当我尝试加载大小为ca的csv文件时. 8 * 4百万(总计3200万),这也花费了非常非常长的时间.我在网上搜索,但找不到解决方法.有人知道一个好的解决方法吗?

There are many reports of slow performance of Octave's dlmread. I was hoping that this was fixed in 3.2.4, but when I tried to load a csv file that has a size of ca. 8 * 4 mil (32 mil in total), it also took very, very long time. I searched the web but could not find a workaround for this. Does anybody know a good workaround?

推荐答案

我遇到了相同的问题,并且使用了R,所以我的解决方案是在R中使用"read.csv",然后使用R包"R". matlab"中写入".mat"文件,然后将其加载到Octave中.

I experienced the same problem and had R handy, so my solution was to use "read.csv" in R, and then use the R package "R.matlab" to write a ".mat" file, and then load that in Octave.

"read.csv"也可能非常慢,但这在我的情况下效果很好.

"read.csv" can be pretty slow too, but this worked very well in my case.

这篇关于如何在Octave中有效地从csv读取大型矩阵的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆