Octave:导入 csv 格式的大矩阵
我正在尝试将矩阵(大约 80.000 行)从 csv 文件导入到 Octave。 明显的解决方案看起来像:
load("-ascii","relative_directory/the_file.csv")
或者可能重命名文件并尝试:
load("-ascii", "relative_directory/the_file.txt")
但我不断收到错误:
load:无法从文件读取矩阵 “relative_directory/the_file.csv”
或.txt,没有更多详细信息。任何提示表示赞赏。
I'm trying to import a matrix (about 80.000 rows) from a csv file to Octave.
The obvious solution seems something like:
load("-ascii","relative_directory/the_file.csv")
or maybe renaming the file and trying:
load("-ascii", "relative_directory/the_file.txt")
Yet I keep getting the error:
load: failed to read matrix from file
"relative_directory/the_file.csv"
or .txt without anymore details. Any tips are appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我们使用带有“-ascii”选项的“load”,则删除所有字符,例如:
并仅保留数字可以解决导入问题。我还尝试使用“-text”选项而不是“-ascii”,但这也会导致错误,
Deleting all characters like:
and leaving only numbers solves the importing problem if us use "load" with the "-ascii" option. I also tried using the "-text" option instead of -ascii" but this too results in the error,