Install any skill in seconds. Free to start, no credit card required.
Get Started Free →matlab/simulating-simulink-models
Runs Simulink models programmatically for data exploration, parameter sweeps, and custom analysis using sim() with SimulationInput/SimulationOutput.
Passed 21 of 22 test cases with the skill, and 13 of 22 without it.
and 8 more in the full report
8 fixed13 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 8 test cases the skill fixed. Same model, same prompt, with and without the skill.
In my model 'DC_Motor', I need to override the 'Gain' block parameter for block ID 'DC_Motor:12' to a value of '15' during a simulation run without changing the model file. Show me the MATLAB code.
| Checked | Without skill | With skill |
|---|---|---|
| Uses Simulink.ID.getFullName to resolve the block path from 'DC_Motor:12'. | Missed | Passed |
| Calls setBlockParameter on the SimulationInput object using the resolved path. | Missed | Passed |
The instructions your model reads when the skill loads.
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.
sim('ModelName') call works without this skilltesting-simulink-modelstesting-simulink-models (requires Simulink Test; auto-creates a harness, compiles only the subsystem — much faster than sim() which always compiles the entire model)building-simulink-modelsmodel_check tool directlygenerate-requirement-draftsAlways simulate using Simulink.SimulationInput and Simulink.SimulationOutput:
in = Simulink.SimulationInput('MyModel');
in = in.setModelParameter('StopTime', '10');
out = sim(in);
Use SimulationInput methods to configure the simulation:
% Model-level parameters (StopTime, SolverType, SimulationMode, etc.)
in = in.setModelParameter('StopTime', '10', 'SolverType', 'Fixed-step');
% Block parameters — resolve path from blk_X ID (never type block names manually)
blkPath = Simulink.ID.getFullName('MyModel:5');
test cases passed, vs 13 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.