13.07.2015 Views

MAT-File Format - SERC

MAT-File Format - SERC

MAT-File Format - SERC

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1 <strong>MAT</strong>-<strong>File</strong> <strong>Format</strong>IntroductionThis document describes the internal format of <strong>MAT</strong>LAB ® Level 4 and Level 5<strong>MAT</strong>-files. Level 4 <strong>MAT</strong>-files are compatible with versions of <strong>MAT</strong>LAB up toVersion 4. Level 5 <strong>MAT</strong>-files are compatible with <strong>MAT</strong>LAB Versions 5 and up.You can read and write Level 4 <strong>MAT</strong>-files with the later versions of <strong>MAT</strong>LAB,but when writing a <strong>MAT</strong>-file under these circumstances, you need to specify aswitch in the save or matOpen command line to tell <strong>MAT</strong>LAB that the <strong>MAT</strong>-fileis at Level 4.A <strong>MAT</strong>-file stores data in binary (not human-readable) form. In <strong>MAT</strong>LAB, youcreate <strong>MAT</strong>-files using the save function, which writes the arrays currently inmemory to a file as a continuous byte stream. By convention, this file has thefilename extension .mat; thus the name <strong>MAT</strong>-file. The load function reads thearrays from a <strong>MAT</strong>-file into the <strong>MAT</strong>LAB workspace.Most <strong>MAT</strong>LAB users do not need to know the internal format of a <strong>MAT</strong>-file.Even users who must read and write <strong>MAT</strong>-files from C and Fortran programsdo not need to know the <strong>MAT</strong>-file format if they use the <strong>MAT</strong>-file interface.This interface shields users from dependence on the details of the <strong>MAT</strong>-fileformat.Note See “Importing and Exporting Data” in the <strong>MAT</strong>LAB ExternalInterfaces documentation for information on the <strong>MAT</strong>-file interface. See “C [orFortran] <strong>MAT</strong>-<strong>File</strong> Functions” in the <strong>MAT</strong>LAB External Interfaces Referencedocumentation for information on the functions available with this interface.However, if you need to read or write <strong>MAT</strong>-files on a system that does notsupport the <strong>MAT</strong>-file interface, you must write your own read and writeroutines. The <strong>MAT</strong>-file interface is only available for platforms on which<strong>MAT</strong>LAB is supported. This document provides the details about the <strong>MAT</strong>-fileformat you will need to read and write <strong>MAT</strong>-files on these systems.1-2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!