Call MATLAB from Fortran
Write Fortran programs that work with MATLAB
Engine applications are standalone programs that allow you to call MATLAB®from your own Fortran programs, using MATLAB as a computation engine. To build an engine application, call themex
function.
Engine applications require an installed version of MATLAB; you cannot run the MATLAB engine on a machine that only has the MATLAB Runtime.
Fortran Engine API Functions
engOpen |
StartMATLABengine session |
engClose |
QuitMATLABengine session |
engEvalString |
Evaluate expression in string |
engGetVariable |
Copy variable fromMATLABengine workspace |
engPutVariable |
Put variable intoMATLABengine workspace |
engOutputBuffer |
Specify buffer forMATLABoutput |
Topics
- Write Fortran Engine Applications
What to do to start building Fortran engine applications.
- Call MATLAB Functions from Fortran Applications
Create a Fortran engine application
fengdemo.F
. - Build and Run Fortran Engine Applications on Windows
This example shows how to build and run the Fortran example
fengdemo.F
on Windows®platforms. - Build and Run Fortran Engine Applications on Linux
This example shows how to build and run the
fengdemo.F
example on Linux®platforms. - Build and Run Fortran Engine Applications on macOS
This example shows how to build and run the example
fengdemo.F
from themacOSTerminal Window.