A MEX file is a function, created in MATLAB, that calls a C/C++ program or a Fortran subroutine. A
MEX function behaves just like a MATLAB script or function.
To call a MEX function, use the name of the MEX file, without the file
extension. The MEX file contains only one function or subroutine.
The calling syntax depends on the input and output arguments defined
by the MEX function. The MEX file must be on your MATLAB path.
While MATLAB scripts and functions have platform-independent
extensions
.m
and
.mlx
, MEX
functions have these 64-bit platform-specific file extensions: