External Interfaces/API | ![]() ![]() |
You can use MAT-files, the data file format MATLAB uses for saving data to disk, to import data to and export data from the MATLAB environment. MAT-files provide a convenient mechanism for moving your MATLAB data between different platforms in a highly portable manner. In addition, they provide a means to import and export your data to other stand-alone MATLAB applications.
To simplify your use of MAT-files in applications outside of MATLAB, we provide a library of access routines that you can use in your own C or Fortran programs to read and write MAT-files. Programs that access MAT-files also use the mx
API routines discussed in this book.
The following list summarizes the contents of this chapter:
For additional information and support in building your applications, see the section entitled, Additional Information.
This section describes the various techniques for importing data to and exporting data from the MATLAB environment. The main topics that are discussed are:
The most important approach to importing and exporting data involves the use of MAT-files, the data file format that MATLAB uses for saving data to your disk. MAT-files provide a convenient mechanism for moving your MATLAB data between different platforms and for importing and exporting your data to other stand-alone MATLAB applications.
To simplify your use of MAT-files in applications outside of MATLAB, we have developed a library of access routines with a mat
prefix that you can use in your own C or Fortran programs to read and write MAT-files. Programs that access MAT-files also use the mx
prefixed API routines discussed in Creating C Language MEX-Files and Creating Fortran MEX-Files.
![]() | Running the phonebook Program | Importing Data to MATLAB | ![]() |