Write Fortran Engine Applications - MATLAB & Simulink (original) (raw)
Engine applications are standalone programs that allow you to call MATLABĀ® from your own Fortran programs, using MATLAB as a computation engine. To build a Fortran engine application, you need:
- The ability to write Fortran source code. You can create these files with the MATLAB Editor.
- A Fortran compiler supported by MATLAB. For an up-to-date list of supported compilers, see Supported and Compatible Compilers.
- Fortran Matrix API functions. However, the
mxGetProperty
andmxSetProperty
functions are not supported for standalone applications. - Fortran Engine Library functions. For more information, see MATLAB Engine APIs for C and Fortran.
- To build the application, call the mex command with the
-client engine
option.
To run the application, tell the operating system where the API shared libraries reside by setting the relevant environment variable.
- Set Run-Time Library Path on Windows Systems
- Set Run-Time Library Path on macOS Systems
- Set Run-Time Library Path on Linux Systems
On Windows, Register MATLAB as a COM Server.
For examples, see:
- Build and Run Fortran Engine Applications on Windows
- Build and Run Fortran Engine Applications on Linux
- Build and Run Fortran Engine Applications on macOS
- Call MATLAB Functions from Fortran Applications