Do I Need to Upgrade My MEX Files to Use Interleaved Complex API?
You do not need to update your MEX source code to continue to build your MEX files.
mex command uses the
-R2017b API by default. However, in a future version of
mex will use the interleaved complex API
-R2018a by default and then you need to modify your build
command. Therefore, to ensure the desired behavior across versions of MATLAB, add the compatibility flag
-R2017b to your build
Can I Run Existing MEX Functions?
You can run existing binary MEX files without upgrading the files for use with the
interleaved complex API. However, other incompatibilities might prevent execution of
an existing MEX function. If your function does not execute properly, search for
mex in the relevant MATLAB release notes and review the Compatibility Considerations
Must I Update My Source MEX Files?
|State of Your Source Code
|My MEX functions do not use complex numbers.
MathWorks recommends that you update
your code to use the
If you use
I do not plan to update my code.
If your MEX functions use complex numbers, then you have
chosen to opt out. MathWorks recommends that you build using the
If your code processes complex numbers, you might notice a performance impact as MATLAB accesses the compatibility interface.
I want to update my code. Where do I start?
To update source code, see Upgrade MEX Files to Use Interleaved Complex API.
I use complex numbers in MEX functions, but do not have access to the source code.
Ask the owner of the source code to follow the steps in Upgrade MEX Files to Use Interleaved Complex API.
I use complex numbers with third-party libraries. My MEX code is responsible for transforming the MATLAB representation of complex numbers to the library's representation of complex numbers.
Identify the library's representation of complex numbers. Sometimes the representation might be closer to the interleaved representation used in MATLAB.
In other cases, libraries have options for representing complex numbers in memory. If this is so, refer to the vendor documentation and choose the representation that most closely matches the MATLAB interleaved representation.
My MEX function generates errors.
You must recompile the MEX file from the source code. If using