ABSTRACT

MATLAB includes a variety of ways by which we could use the speed associated with native code in order to improve the performance of our MATLAB code. These mechanisms include:

• Using compiled C/C++/Fortran code in a specific (MEX) format • Using MATLAB Coder Toolbox to convert m-code to compiled C/C++-code • Running MATLAB code on dedicated FPGA hardware • Improving the performance of compiled (deployed) code • Integrating Java functionality in MATLAB • Using external (third-party) libraries in MATLAB

8.1.1 Introduction

MEX (MATLAB Executable) files are written in C, C++, or Fortran in a certain standard format and then compiled using MATLAB’s built-in mex function1139 and one of several supported external compilers. The compilation result is a regular dynamic-link (or shared) library, which has a MATLAB-specific file extension (e.g., .mexw64).* This is a binary file that can be analyzed,† but cannot be edited in a text editor.