Call your own Fortran programs from the MATLAB command line as if they were built-in functions. These programs are called MEX files and the function name is the MEX file name.
Write your programs using the MATLAB API libraries — MEX Library and Fortran Matrix Library. The
functions in these libraries facilitate the transfer of data between MEX files and
the workspace. For more information, see Fortran Source MEX Files. Build the source file into an
executable program using the
mex function. For more information,
see Executable Fortran MEX Files.
To call MATLAB functions from Fortran programs, use the MATLAB API for Fortran engine library functions.
To read and write MATLAB data from C/C++ programs, use the Applications to Read MAT-File Data.