To build this program, see Compiling and Linking MAT-File Programs.
After compiling and linking your MAT-file program, you can run the standalone application you just produced. This program creates a MAT-file, matdemo.mat, that you can load into MATLAB. To run the application, depending on your platform, either double-click its icon or enter matdemo1 at the system prompt:
matdemo1 Creating MAT-file matdemo.mat ... Done creating MAT-file
To verify the MAT-file, at the command prompt, enter:
whos -file matdemo.mat Name Size Bytes Class Numeric 3x3 72 double array String 1x33 66 char array Grand total is 42 elements using 138 bytes