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 than sim() which always compiles the entire model)
  • Adding, connecting, or deleting blocks → use building-simulink-models
  • Checking model structure for unconnected ports → use model_check tool directly
  • Generating requirements from model behavior → use generate-requirement-drafts
Installs
89
GitHub Stars
949
First Seen
May 7, 2026
simulating-simulink-models — matlab/simulink-agentic-toolkit