MATLAB's C/C++ mex interface changes from time to time, with new releases of MATLAB. Functionality can be added, removed or changed. In order to write a C/C++ mex file which can be compiled by different versions of MATLAB, it might be necessary to have separate code for these different versions, selected using pre-processor macros. To do this, there needs to be a #define in mex.h which states the MATLAB version. Is there such a #define, and if so, what is it called?
MATLAB: How to determine the MATLAB version when compiling C/C++ mex files
cdefineMATLABmexversion
Best Answer