simulating-simulink-models
Installation
SKILL.md
Simulating Simulink Models with the sim Command
Use this skill when you need to configure a simulation non-destructively — parameter overrides, custom inputs, batch execution, or structured output access. For persistent, reusable pass/fail behavioral testing (especially of individual subsystems), use testing-simulink-models instead. For trivial one-shot simulations without configuration, a direct sim() call suffices without this skill.
When to Use
- Overriding model or block parameters non-destructively (setVariable, setBlockParameter, setModelParameter) — without modifying the .slx file
- Passing custom input signals to root-level Inport blocks via setExternalInput with a Dataset
- Running parameter sweeps or batch simulations (SimulationInput arrays, parsim, Fast Restart)
- Accessing logged signal data (logsout) for analysis after simulation
When NOT to Use
- Trivial one-shot simulations without parameter overrides or custom inputs — a direct
sim('ModelName')call works without this skill - Writing declarative Gherkin-based tests → use
testing-simulink-models - Testing an individual subsystem or component → use
testing-simulink-models(requires Simulink Test; auto-creates a harness, compiles only the subsystem — much faster thansim()which always compiles the entire model) - Adding, connecting, or deleting blocks → use
building-simulink-models - Checking model structure for unconnected ports → use
model_checktool directly - Generating requirements from model behavior → use
generate-requirement-drafts