Problem opening "large" file
显示 更早的评论
I've been trying to open/read ASCII files which are not so big: about 15Mb; and I get the message "not enough memory to open the file" or something like that. According to the "memory" command, I've got plenty of available memory :
- Maximum possible array: 13020 MB (1.365e+10 bytes) *
- Memory available for all arrays: 13020 MB (1.365e+10 bytes) *
- Memory used by MATLAB: 708 MB (7.420e+08 bytes)
- Physical Memory (RAM): 8073 MB (8.465e+09 bytes)
What's going on ?
4 个评论
dpb
2014-2-6
It's possible while there's lots of memory there's not enough contiguous memory--I don't know that the memory command can tell that for certain.
Show your work -- how are you attempting to read the file?
dpb
2014-2-6
Again, show your work...actual code/error messages in context are far more informative than descriptions paraphrased...
Have you done a
clear all
and similar first?
Have you tried to load or read a subset? Are you sure there are record markers in the file or is it perhaps malformed as a single, long record of 15+MB or some other problem inherent in it/them?
And, of course, if you can control the creation of these files, for such sizes using stream unformatted is much faster and more disk efficient than formatted.
Walter Roberson
2014-2-6
To check, your fopen() statement itself is triggering the memory error? And you have no accidentally defined "fopen" as an array and have not accidentally provided your own fopen.m file ?
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Standard File Formats 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!