record of file
1 次查看(过去 30 天)
显示 更早的评论
hi,
is there function deal with file such record of file ?
i.e. my file with very large size, can I deal with file directly instead of using arrays.
thanks in advance
0 个评论
回答(2 个)
Image Analyst
2012-1-8
How large are your files? How large would your arrays be? Hundreds of megabytes? What do you mean by "deal with"? How about fopen, fgetl, fread, etc.?
Walter Roberson
2012-1-8
You would have to write routines yourself to handle this.
There is no mechanism to position to a particular line number in a text file. The closest you can get to that is to read the file ahead of time looking for each beginning of line and recording the value of ftell() at the beginning of line. Then to position to a given line, you would index the recorded values at the line number and fseek() to that recorded position.
The MATLAB- provided routines that can deal with files as structures only work with binary files.
If you happen to have R2011b, then there is a new matfile object that can work with version -7.3 .mat files in order to retrieve an array location from a variable.
2 个评论
Walter Roberson
2012-1-9
You would have to install a new one.
Note: The *b releases are never available in Student Version.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!