Using the C Math Library    

Reading Data from a MAT-File 

Using mlfLoad(), you can read in mxArray data from a binary MAT-file. The prototype for mlfLoad()

where file points to an mxArray containing the name of the MAT-file and the variable argument list consists of at least one pair of arguments - the name of the variable that you want to load and a pointer to the address of an mxArray variable that will receive the data. The last argument to mlfLoad() is always a NULL, which terminates the argument list:

For more information on MAT-files, consult the online version of the MATLAB Application Program Interface Guide.


 Writing Data to a MAT-File Example - Saving and Loading Data (ex5.c)