Documentation

Using MEX-Files

Binary MEX-files are subroutines produced from C/C++ or Fortran source code. They behave just like MATLAB® scripts and built-in functions. While scripts have a platform-independent extension .m, MATLAB identifies MEX-files by platform-specific extensions. The following table lists the platform-specific extensions for MEX-files.

MEX-File Platform-Dependent Extension

PlatformBinary MEX-File Extension

Linux® (64-bit)

mexa64

Apple Mac (64-bit)

mexmaci64

Microsoft® Windows® (32-bit)

mexw32

Windows (64-bit)

mexw64

You cannot use a binary MEX-file on a platform if you compiled it on a different platform. Recompile the source code on the platform for which you want to use the MEX-file.For information about using MEX S-functions, see your Simulink® documentation.

Was this topic helpful?