Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Converts C, C++, and Fortran MEX files from the Separate Complex API to the Interleaved Complex API.
68% 95%+27 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 15 of 22 without it.
I am refactoring a C MEX file that performs complex array math into SC/IC guarded mode. Can I structure the code so that a single `for` loop executes outside the `#if MX_HAS_INTERLEAVED_COMPLEX` guard for both SC and IC builds?
Explains that complex data requires separate guarded blocks because SC uses separate pointers while IC uses interleaved struct arrays.
3 of 3 safety checks passed
Convert C, C++, and Fortran MEX source files from the Separate Complex (SC) API to the Interleaved Complex (IC) API, following the MathWorks upgrade workflow with guardrails for SC/IC guarded builds using MX_HAS_INTERLEAVED_COMPLEX, required vs recommended changes, and verification.
mxGetPr/mxGetPi, mxGetData/mxGetImagData, or mxSetPr/mxSetPimex -R2018a.cpp, .cxx) using the C Matrix API (mxGetPr/mxGetPi, etc.).F, .f90) using mxGetPr/mxGetPi via %val() pointersmxGetDoubles, mxGetComplexDoubles, etc.) from the start for better performance on complex data and modern, type-safe data access instead of legacy mxGetPr/mxGetPimatlab::mex::Function) — different API entirely; this skill covers C++ files that use the C Matrix API (mex.h), not the MATLAB Data API for C++ and C++ EnginemxGetDoubles, mxGetComplexDoubles, etc.) — already IC-compatible, no conversion neededFollow these 7 steps in order. Do NOT skip steps.
Before changing anything, understand the current state:
mxGetPi, mxIsComplex, mxCOMPLEX)Report to the user:
Next to this one in the catalogue, plus more from the same author.