simulating-simulink-models
Configures Simulink simulations non-destructively using SimulationInput objects — parameter overrides without modifying the model, batch sweeps via parsim, custom input signals via Dataset, and simulation data retrieval via logsout
Install / Use
npx skills add matlab/simulink-agentic-toolkit --skill simulating-simulink-modelsInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
Our assessment of simulating-simulink-models
simulating-simulink-models scores 89/100 on our quality scale, 1420th of 4,615 Development & Engineering skills we index (top 31%).
Its SKILL.md is 5.5 KB long, well organised into 11 sections with 9 code examples: a solid amount of guidance for an agent.
With 1,148 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 16 days ago, so simulating-simulink-models is actively maintained.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
simulating-simulink-models compared with similar skills
All 4 of these similar skills score higher than simulating-simulink-models; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| simulating-simulink-models (this skill)by matlab | 89 | 1.1k | 16d ago | SKILL.md |
| ai-job-searchby MadsLorentzen | 100 | 44.9k | 1d ago | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 41.7k | 3d ago | CLAUDE.md |
| algorithmic-artby anthropics | 100 | 177.9k | 11d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 11d ago | SKILL.md |
Frequently asked questions
- How do I install simulating-simulink-models?
- Run
npx skills add matlab/simulink-agentic-toolkit --skill simulating-simulink-models. The install tabs above show the steps for each supported agent. - Which AI agents does simulating-simulink-models work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is simulating-simulink-models safe to use?
- It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is simulating-simulink-models still maintained?
- The repository was last updated 16 days ago, so simulating-simulink-models is actively maintained.
Skill content
View source on GitHubname: simulating-simulink-models description: Configures Simulink simulations non-destructively using SimulationInput objects — parameter overrides without modifying the model, batch sweeps via parsim, custom input signals via Dataset, and simulation data retrieval via logsout. Use when running sim()/parsim() with setVariable, setBlockParameter, setExternalInput, or when performing parameter sweeps and multi-run analysis. Not needed for one-shot simulations without configuration. license: https://www.mathworks.com/content/dam/mathworks/license/pmrl/license.md metadata: author: MathWorks version: "1.2"
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
Minimal working pattern
Always simulate using Simulink.SimulationInput and Simulink.SimulationOutput:
in = Simulink.SimulationInput('MyModel');
in = in.setModelParameter('StopTime', '10');
out = sim(in);
Setting parameters
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');
in = in.setBlockParameter(blkPath, 'Gain', '5');
% MATLAB workspace variables used by the model
in = in.setVariable('Kp', 1.2);
Input signals
Pass input signals through Inport blocks using a Simulink.SimulationData.Dataset. Elements are matched to Inport blocks by index position — the first element maps to the Inport with port number 1, the second to port number 2, and so on.
dt = 0.01;
N = 1000;
t = dt*(0:N)';
u = sin(2*pi*t);
ts = timeseries(u, t);
ds = Simulink.SimulationData.Dataset;
ds{1} = ts;
in = in.setExternalInput(ds);
out = sim(in);
You can also use timetable as an input format:
secs = seconds(t);
tt = timetable(secs, u);
ds = Simulink.SimulationData.Dataset;
ds{1} = tt;
in = in.setExternalInput(ds);
Discovering logged data
First, discover what kinds of logged data the model produces using who, then inspect signal names within logsout:
in = Simulink.SimulationInput('MyModel');
out = sim(in);
% See what logging properties exist (logsout, yout, tout, etc.)
who(out)
% List individual signal names within logsout
disp(out.logsout.getElementNames);
Accessing logged data
Logged signals are available through out.logsout. Access them directly by name:
% Plot a logged signal
plot(out.logsout.get('signalName').Values)
% Get time and data separately
sig = out.logsout.get('signalName').Values;
plot(sig.Time, sig.Data)
Multiple simulations
When running many simulations, create an array of Simulink.SimulationInput objects:
in = repmat(Simulink.SimulationInput('MyModel'),N,1);
for k = 1:N
in(k) = Simulink.SimulationInput('MyModel');
in(k) = in(k).setVariable('gain', gains(k));
end
out = sim(in);
To enable fast restart for iterative sweeps (compiles the model only once):
out = sim(in, 'UseFastRestart', 'on');
Parallel simulation (parsim)
To run multiple simulations in parallel, use parsim instead of looping over sim:
for k = 1:N
in(k) = Simulink.SimulationInput('MyModel');
in(k) = in(k).setVariable('gain', gains(k));
end
out = parsim(in);
parsim also supports 'UseFastRestart','on' for faster batch runs.
Guardrails
- Never use
set_param,load_system, oropen_systemto drive simulation —SimulationInputreplaces all of these. - Never wrap
SimulationOutputaccess intry-catchorisfield—simeither returns a valid object or throws.SimulationOutputhas noisfieldmethod. - Never create unnecessary intermediate variables for logged data — access directly via
out.logsout.get('name').Values. - Always use
in/outas variable names forSimulationInput/SimulationOutput. - Always use
setExternalInputwith aDataset— don't pass comma-separated lists of variables.
Copyright 2026 The MathWorks, Inc.
Related Skills
ai-job-search
44.9kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
41.7kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
