Deploy AI models to embedded hardware using MathWorks tools (MATLAB, Simulink, Embedded Coder). Covers two workflow patterns: (1) MathWorks-native or imported models rebuilt as dlnetwork for lean hardware, (2) direct C/C++ code generation from PyTorch and LiteRT models. Both patterns support all targets (Cortex-M/A/R, x86, GPU).
SkillScore91Maintained
Automatic
◆AI Engineer pack
Last verified 8/16/2026
What it changes
Passed 19 of 21 test cases with the skill, and 11 of 21 without it.
Without skill52%
With skill91%
Checks it passed that the model alone missed
Recommends Pattern 2 (LiteRT Direct Codegen).
Instructs reshaping the tensor from [C x T] to [C x 1 x T].
Recommends Pattern 1 (import as dlnetwork then generate code).
and 8 more in the full report
9 fixed12 passed either way2 still failing0 broke
Pass-rate lift
+39 pp
Tokens
+161%
Agent turns
0%
Response time
-45%
Model gemini-3.6-flashMeasured 8/16/2026v121 of 23 cases passed with skill · 21 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 9 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 9
Prompt
If I need to check the syntax and default parameters of an installed support package function in MATLAB R2026a, what command should I execute first in MATLAB?
What was checked, without and with the skill
Checked
Without skill
With skill
Directs executing help <function> in the live MATLAB session first.
Missed
Passed
case-21 · gemini-3.6-flash · 8/16/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md231 linessingle file
Embedded AI for Engineered Systems
Deploy AI models to embedded hardware using MATLAB® and Simulink®. This skill is
written specifically for MATLAB R2026a and uses APIs, functions, and workflows
introduced in that release. It covers the complete lifecycle: model creation or
import, verification, compression, system-level simulation, and code generation
for resource-constrained targets.
Requires MATLAB R2026a or newer. Core toolboxes: Deep Learning Toolbox, Statistics
and Machine Learning Toolbox, MATLAB Coder, Embedded Coder, Simulink, and
Fixed-Point Designer. Workflow-specific support packages are checked during
Environment Discovery. The MATLAB and Simulink Agentic Toolkits must be available
so the agent can drive a live MATLAB and Simulink session through MCP tools.
When to Use
Deploying a trained neural network (MATLAB-native or imported) to embedded hardware
Generating C or CUDA code from a deep learning model for ARM Cortex-M/A/R, x86, or GPU targets
Deploying imported PyTorch, ONNX, TensorFlow, or LiteRT models to embedded targets (import step handled by /matlab-import-external-ai-model)
Compressing AI models (quantization, pruning, projection) to fit resource-constrained hardware
Integrating AI inference into a Simulink system model for closed-loop simulation before code generation
Using loadPyTorchExportedProgram, importNetworkFromPyTorch, importNetworkFromONNX, importNetworkFromTensorFlow, dlquantizer, exportNetworkToSimulink, or Embedded Coder with AI models
Choosing between MathWorks-native code generation and direct PyTorch/LiteRT code generation
When NOT to Use
Training a model purely for research with no deployment target — use Deep Learning Toolbox documentation directly
Deploying to cloud/server endpoints (no embedded target) — use MATLAB Production Server or MATLAB Compiler SDK
Working with classical ML models (decision trees, SVMs, ensembles) that aren't neural networks — use Statistics and Machine Learning Toolbox codegen workflows directly. Note: fitcnet/fitrnet neural network models ARE covered by this skill
Generating code for non-AI Simulink models — use standard Embedded Coder workflows
Converting between model formats without an embedded deployment goal (e.g., ONNX to MATLAB for desktop inference only)
Workflow Pattern Selection
This skill uses two deployment patterns:
Pattern 1 — MATLAB Network Codegen: Import or build a dlnetwork, optionally
compress it, then generate C/C++ via MATLAB Coder or export to Simulink.
See references/pattern1/workflow.md.
Pattern 2 — PyTorch/LiteRT Direct Codegen: Load a PyTorch (.pt2) or LiteRT
Design antennas, arrays, and PCB antennas using MATLAB Antenna Toolbox. Covers catalog antenna design and pattern analysis, custom antenna construction (customAntenna + shape.*), PCB antenna design (pcbStack + antenna.*), finite and infinite array design, AI-accelerated design exploration (AIAntenna, patternFromAI), and optimization (SADEA/TR-SADEA). Use when the user wants to design, create, model, analyze, optimize, or fabricate an antenna or array.