Main Content

本页的翻译已过时。点击此处可查看最新英文版本。

用于 Fortran 的 MATLAB 引擎 API

编写可用于 MATLAB 的 Fortran 程序

引擎应用程序是独立的程序,它们允许您从自己的 Fortran 程序调用 MATLAB®,从而将 MATLAB 用作计算引擎。要编译引擎应用程序,请调用 mex 函数。

引擎应用程序需要已安装版本的 MATLAB;您无法在只有 MATLAB Runtime 的机器上运行 MATLAB 引擎。

Fortran 引擎 API 函数

engOpenStart MATLAB engine session
engCloseQuit MATLAB engine session
engEvalStringEvaluate expression in string
engGetVariableCopy variable from MATLAB engine workspace
engPutVariablePut variable into MATLAB engine workspace
engOutputBufferSpecify buffer for MATLAB output

主题

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 the macOS Terminal Window.