Updated 21 Oct 2002
Mex-functions can be compiled using the C structure mxArray. But it's also possible to use the C++ mwArrays and all the C++ math library. Use "cppmex -setup" to initialise the compiler for your installation and then type cppmex instead of mex. Now the entry point become void cppMexFunction(int nlhs, mwArray mlhs, int nrhs, mwArray mrhs).
Jerome Lacaille (2023). cppmex (https://www.mathworks.com/matlabcentral/fileexchange/2554-cppmex), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
- Application Deployment > MATLAB Compiler SDK >
- MATLAB > External Language Interfaces > C++ with MATLAB > Call C++ from MATLAB >
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.