从 Fortran 调用 MATLAB
编写可用于 MATLAB 的 Fortran 程序
引擎应用程序是独立的程序,它们允许您从自己的 Fortran 程序调用 MATLAB®,从而将 MATLAB 用作计算引擎。要编译引擎应用程序,请调用 mex
函数。
引擎应用程序需要已安装版本的 MATLAB;您无法在只有 MATLAB Runtime 的机器上运行 MATLAB Engine。
Fortran Engine API 函数
engOpen | Start MATLAB engine session |
engClose | Quit MATLAB engine session |
engEvalString | Evaluate expression in string |
engGetVariable | Copy variable from MATLAB engine workspace |
engPutVariable | Put variable into MATLAB engine workspace |
engOutputBuffer | Specify buffer for MATLAB output |
主题
- Write Fortran Engine Applications
What to do to start building Fortran engine applications.
- 从 Fortran 应用程序中调用 MATLAB 函数
创建一个 Fortran 引擎应用程序
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 the macOS Terminal Window.