What problem does it solve?
Converting MATLAB algorithms into deployable C/C++ or CUDA code involves strict typing rules, codegen-incompatible language constructs, and complex configuration options that frequently cause build failures or incorrect output. This Skill guides an AI agent through the full MATLAB Coder workflow so generated code compiles, matches MATLAB behavior, and meets deployment constraints.
Core Features & Use Cases
- Codegen-Ready Authoring: Write or review MATLAB code against code generation constraints, using coder.* directives such as coder.varsize, coder.const, coder.extrinsic, and coder.unroll.
- Generation and Verification: Run coder.screener, generate MEX/lib/dll/exe targets, and verify numerical equivalence with coder.runTest or matlabtest.coder.TestCase, including SIL with Embedded Coder.
- Config Tuning and Acceleration: Tune coder.config properties for embedded, speed, readability, size, or safety goals, and profile generated MEX with coder.timeit and coder.perfCompare to eliminate hotspots.
- Use Case: A user needs to deploy a signal-processing function as a static C library with no dynamic memory. The Skill screens the function, fixes unsupported constructs with user approval, generates and verifies a MEX, then produces a DMA-off lib configuration with an appropriate StackUsageMax.
Quick Start
Ask the agent to generate C code from your MATLAB function, for example: generate a verified MEX and then a static C library from myFunction.m with double 100x1 input.