User`s guide
Programming
21-21
Programming
Saving to MAT-Files Larger than 2 GB
With MATLAB R2006b, you can save data items that are over 2 gigabytes in size. This
capability is implemented in MATLAB using a new HDF5-based format for MAT-files.
To save to a MAT-file in this format, specify the new -v7.3 option with the save
function:
save -v7.3 myfile v1 v2
Note: MATLAB Version 7.3 does not write MAT-files in HDF5 format by default in this
release; you must explicitly specify the -v7.3 switch.
In this release,
• The default MAT-file format employed by save is the standard MAT-file format used
in the R14, R14SP, and R2006a releases. You can explicitly specify this format with
the command save -v7.
• To write an HDF5-based MAT-file, you must use save -v7.3.
• HDF5-based MAT-files are not compressed.
In a future release,
• The default MAT-file format will be the HDF5-based format. You can explicitly
specify the HDF5-based format with the command save -v7.3.
• To write the standard MAT-file format, you must use save -v7.
• As of release R2008a, HDF5-based MAT files are compressed.
Here is a summary of the version options that you can use with save:
save Option Description Available In
Versions
Is the Default
In Versions
save -v4 Save to a MAT-file you can open in
MATLAB version 4
V5 and later V4, V5
save -v6 Save to a MAT-file you can open in
MATLAB versions 5 or 6
V7 and later V6