Using the C Math Library    

Writing Data to a MAT-File

Using mlfSave(), you can save the data within mxArray variables to disk. The prototype for mlfSave() is

where file points to an mxArray containing the name of the MAT-file and mode points to a string that indicates whether you want to overwrite or update the data in the file. The variable argument list consists of at least one pair of arguments - the name you want to assign to the variable you're saving and the address of the mxArray variable that you want to save. The last argument to mlfSave() is always a NULL, which terminates the argument list:


 Importing and Exporting Array Data Reading Data from a MAT-File