Create MAT-File in Fortran
The matdemo1.F
example creates the MAT-file,
matdemo.mat
. To see the code, open the
file in MATLAB® Editor.
After building the program, run the application. 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 type matdemo1
at the system prompt:
matdemo1
Creating MAT-file matdemo.mat ... Done creating MAT-file
To verify the MAT-file, at the MATLAB command prompt, type:
whos -file matdemo.mat
Name Size Bytes Class Attributes Numeric 3x3 72 double NumericGlobal 3x3 72 double global String 1x33 66 char
Note
For an example of a Microsoft®
Windows® standalone program (not MAT-file specific), see
engwindemo.c
in the
matlabroot
\extern\examples\eng_mat
folder.