Agent skill · Audited from source

Simulating Simulink Models

skill · matlab/simulink-agentic-toolkitNOASSERTION licenceAudited 14 Oct 2026 · source 9090332613b6

★ 1,225pushed 6 days agoversion 1.2
✓SAFEGrade B · 89/100 · 14 Oct 2026 · 9090332
1,225repo stars · whole matlab/simulink-agentic-toolkit

Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 9090332613b6 and found no filesystem, network or shell access and no hard-coded secrets. What it does: 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…

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
Cite

Cite this page

ModelsAtlas. “Simulating Simulink Models (matlab/simulink-agentic-toolkit)”. Retrieved 14 Oct 2026. https://modelsatlas.com/skills/matlab/simulating-simulink-models

Trust audit

Audit 0.4.1 · source read 14 Oct 2026

Trust score89/100✓SAFE B
0 critical0 high1 medium0 low0 info

SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 13,985 of 14,816 audited skills.

What the source does

  • FilesystemNone observedNo reads or writes in the source
  • NetworkNone observedNo outbound calls in the source
  • ShellNone observedNo commands run in the source
  • DependenciesPinnedNothing floats
  • SecretsNone foundNo keys in source

Five audit layers

LayerWhat we checkResultFindings
L0 ProvenanceRepo owner, licence, archive status, activityWARN1
L1 Static sourceSecrets, path traversal, supply chain, hidden codeNA0
L2 InstructionsPrompt injection, authority framing, hidden directivesPASS0
L3 InventoryThe files and declarations match the sourcePASS0
L4 SandboxRun in isolation and watch behaviourSKIPPED why0

Gates applied: no behavioural pass.

Findings (1)

MEDIUMInventory / provenanceinv.binary · tools/common/+sage/+internal/+utils/@License/License.p
F-13 Inventory / provenanceCWE-1104Layer L0
License.p
Why
a compiled or binary member cannot be reviewed from source
Fix
ship source, or explain the binary in the README

Audit 0.4.1 · source sha 9090332613b6 · 14 Oct 2026Report an issue or request a re-scan

Provenance

Who published it, and what the verdict is pinned to

What it tells the agent

Full source on GitHub ↗

Its 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…

---
name: 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 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`

## Minimal working pattern

Always simulate using `Simulink.SimulationInput` and `Simulink.SimulationOutput`:

```matlab
in = Simulink.SimulationInput('MyModel');
in = in.setModelParameter('StopTime', '10');
out = sim(in);
```

## Setting parameters

Use `SimulationInput` methods to configure the simulation:

```matlab
% 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.

```matlab
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:

```matlab
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`:

```matlab
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:

```matlab
% 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:

```matlab
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):

```matlab
out = sim(in, 'UseFastRestart', 'on');
```

## Parallel simulation (parsim)

To run multiple simulations in parallel, use `parsim` instead of looping over `sim`:

```matlab
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`, or `open_system` to drive simulation — `SimulationInput` replaces all of these.
- **Never** wrap `SimulationOutput` access in `try-catch` or `isfield` — `sim` either returns a valid object or throws. `SimulationOutput` has no `isfield` method.
- **Never** create unnecessary intermediate variables for logged data — access directly via `out.logsout.get('name').Values`.
- **Always** use `in`/`out` as variable names for `SimulationInput`/`SimulationOutput`.
- **Always** use `setExternalInput` with a `Dataset` — don't pass comma-separated lists of variables.

----

Copyright 2026 The MathWorks, Inc.

----

Excerpt, first 5,669 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.

Install

Pinned to the audited commit 9090332

Download folder ↗
git clone https://github.com/matlab/simulink-agentic-toolkit
git -C simulink-agentic-toolkit checkout 9090332613b6

The author documents no install command, so this uses the repository directly. Our verdict covers commit 9090332613b6 only.

Works in

The author has not said which agents this skill supports, and we have not tested it in any.

Audit history

Every audit, every source change

  1. ✓SAFE B 89 / 100

    first audit · source 9090332613b6

README badge

For maintainers · shows the latest audit

ModelsAtlas: SAFE BMODELSATLASSAFE · B
[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/matlab/simulating-simulink-models/badge.svg)](https://modelsatlas.com/skills/matlab/simulating-simulink-models/)

The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.

Similar skills

Building Simulink Models✓SAFE

matlab/simulink-agentic-toolkit

Builds and edits Simulink, System Composer, Stateflow, and Simscape models. Use when modifying model structure, parameters, ports, connections, or Stateflow chart internals.

★ 1.2kGrade B
Filing Bug Reports✓SAFE

matlab/simulink-agentic-toolkit

Generate a standalone bug report that another developer can use to reproduce, investigate, and fix an issue. Use when the user says 'file a bug', 'write a bug report', 'report this issue', or asks to document a defect…

★ 1.2kGrade B
Generate Requirement Drafts!CAUTION

matlab/simulink-agentic-toolkit

Generates draft requirements from Simulink models. Use when drafting or updating requirement artifacts from a model. Prefers Requirements Toolbox (.slreqx) when available; falls back to structured YAML.

★ 1.2kGrade B
Specifying Mbd Algorithms✓SAFE

matlab/simulink-agentic-toolkit

Specify algorithms for Model-Based Design: system specs, architecture specs, implementation plans, test plans. Use when creating specifications for controllers, signal processing, diagnostics, estimators, or other…

★ 1.2kGrade B
Specifying Plant Models✓SAFE

matlab/simulink-agentic-toolkit

Specify plant models for closed-loop simulation: system specs, architecture, build plans, validation plans. Use when creating, updating, or reviewing plant model specifications, planning plant model architecture, or…

★ 1.2kGrade B
Testing Simulink Models!CAUTION

matlab/simulink-agentic-toolkit

The Simulink Agentic Toolkit gives your AI agent both the tools and the expertise to work effectively with Simulink and Model-Based Design.

★ 1.2kGrade B

Add this badge to your README

[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/matlab/simulating-simulink-models/badge.svg)](https://modelsatlas.com/skills/matlab/simulating-simulink-models/)

Questions about Simulating Simulink Models

What does the Simulating Simulink Models skill do?
The Simulink Agentic Toolkit gives your AI agent both the tools and the expertise to work effectively with Simulink and Model-Based Design.
Is Simulating Simulink Models safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can Simulating Simulink Models access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
How current is this page?
The grade is for one exact copy of the source (9090332613b6), read on 2026-10-14. The repository is watched, and a new audit runs when it changes — this is the first audit.

Sources

Spotted something wrong? Report a correction · Methodology

Keep going in your AI

Opens with this page as the source. We add nothing else to the prompt.