record of file
1 view (last 30 days)
Show older comments
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 Comments
Answers (2)
Image Analyst
on 8 Jan 2012
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
on 8 Jan 2012
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 Comments
Walter Roberson
on 9 Jan 2012
You would have to install a new one.
Note: The *b releases are never available in Student Version.
See Also
Categories
Find more on Low-Level File I/O in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!