External Interfaces - The MathWorks - #25

/ 649


catalogue search
P. 01
P. 02
P. 03
P. 04
P. 05
P. 06
P. 07
P. 08
P. 09
P. 10
P. 11
P. 12
P. 13
P. 14
P. 15
P. 16
P. 17
P. 18
P. 19
P. 20
P. 21
P. 22
P. 23
P. 24
P. 25
P. 26
P. 27
P. 28
P. 29
P. 30
P. 31
P. 32
P. 33
P. 34
P. 35
P. 36
P. 37
P. 38
P. 39
P. 40
P. 41
P. 42
P. 43
P. 44
P. 45
P. 46
P. 47
P. 48
P. 49
P. 50


See other catalogues for The MathWorks

Text version of the page
Using MAT-Files
Both types of files can be transported directly between machines: M-files because they are platform independent and MAT-files because they contain a machine signature in the file header. MATLAB checks the signature when it loads a file and, if a signature indicates that a file is foreign, performs the necessary conversion.
Using MATLAB across different machine architectures requires a facility for exchanging both binary and ASCII data between the machines. Examples of this type of facility include FTP, NFS, and Kermit. When using these programs, be careful to transmit MAT-files in binary file mode and M-files in ASCII file mode. Failure to set these modes correctly corrupts the data.
Reading and Writing MAT-Files
Use the save function to save MATLAB arrays currently in memory to a binary file called a MAT-file. MAT-files have the extension .mat.The load command reads MATLAB arrays from a MAT-file on disk back into the
MATLAB workspace.
A MAT-file contains one or more of the data types supported in MATLAB version 5 or later, including strings, matrices, multidimensional arrays, structures, and cell arrays. MATLAB writes the data sequentially onto disk in a continuous byte stream.
MAT-File Interface Library
TheMAT-fileinterfacelibrarycontainsroutinesforreadingandwriting MAT-files. You can call these routines from your own C and Fortran programs. Use these routines, rather than attempt to write your own code, to perform these operations, since using the library insulates your applications from future changes to the MAT-file structure.
Functions in the MAT-file library begin with the three-letter prefix mat.These tables list and describe the MAT-functions.
CMAT-FileRoutines
MAT-Function
Purpose
matOpen
Open a MAT-file.
1-5

pageCatalog pdf di En 2012-06-22-01