本页对应的英文页面已更新,但尚未翻译。 若要查看最新内容,请点击此处访问英文页面。

Fortran MEX API

使用此库在 MATLAB® 环境中通过 Fortran MEX 文件执行操作

在 MEX 文件中使用 mexFunction,就像在 Fortran 程序中使用 subroutine 一样。要调用 MATLAB 函数,请使用 mexCallMATLABmexEvalString。要在 MEX 文件和 MATLAB 工作区之间传递数据,请使用 mexGet*mexSet* 函数。

mexFunctionEntry point to Fortran MEX function
mexFunctionNameName of current MEX function
mexAtExitRegister function to call when MEX function clears or MATLAB terminates
mexCallMATLABCall MATLAB function, user-defined function, or MEX file
mexCallMATLABWithTrapCall MATLAB function, user-defined function, or MEX-file and capture error information
mexEvalStringExecute MATLAB command in caller workspace
mexEvalStringWithTrapExecute MATLAB command in caller workspace and capture error information
mexGetVariableCopy of variable from specified workspace
mexGetVariablePtrRead-only pointer to variable from another workspace
mexPutVariableArray from MEX function into specified workspace
mexPrintfANSI C PRINTF-style output routine
mexErrMsgIdAndTxtDisplay error message with identifier and return to MATLAB prompt
mexWarnMsgIdAndTxtWarning message with identifier
mexIsLockedDetermine if MEX-file is locked
mexLockPrevent clearing MEX-file from memory
mexUnlockAllow clearing MEX-file from memory
mexMakeArrayPersistentMake array persist after MEX file completes
mexMakeMemoryPersistentMake memory allocated by MATLAB software persist after MEX-function completes