User`s guide

Programming
24-9
Programming
Memory-Mapping
Memory-mapping is a mechanism that maps a portion of a file, or an entire file, on disk
to a range of addresses within an application's address space. The application can then
access files on disk in the same way it accesses dynamic memory. This makes file reads
and writes faster in comparison with using functions such as fread and fwrite.
Another advantage of using memory-mapping in MATLAB is that it enables you to
access file data using standard MATLAB indexing operations. Once you have mapped
a file to memory, you can read the contents of that file using the same type of MATLAB
statements used to read variables from the MATLAB workspace. The contents of the
mapped file appear as if they were an array in the currently active workspace. You
simply index into this array to read or write the desired data from the file.
Memory-mapped files also provide a mechanism for sharing data between applications.
This is achieved by having each application map sections of the same file. This feature
can be used to transfer large data sets between MATLAB and other applications.
textscan Enhancements
The textscan function originally read data only from files. As of this release, you can use
textscan to read from strings as well.
xlsread Enhancements
In this release, you can write a function and pass a handle to this function to xlsread.
When xlsread executes, it reads from the spreadsheet, executes your function on the
data read from the spreadsheet, and returns the final results to you.
You can use either of the following syntaxes:
num = xlsread('filename', ..., functionhandle)
[num, txt, raw, X] = xlsread('filename', ..., functionhandle)
For an example, see the xlsread reference page.