From Seo Wiki - Search Engine Optimization and Programming Languages
MEX stands for MATLAB Executable. A MEX file (also written as MEX-file) provides an interface between MATLAB and subroutines written in C, C++ or Fortran. When compiled, MEX files are dynamically loaded and allow non-MATLAB code to be invoked from within MATLAB as if it was a built-in function. To support the development of MEX files, MATLAB offers external interface functions that facilitate the transfer of data between MEX files and MATLAB.