Authoring Simulink Inputs logo

Authoring Simulink Inputs

OrganizationPopular
matlab
authoring-simulink-inputs

Synthesize new waveforms from scratch for Simulink inports using createInputDataset. Use ONLY when the user asks to generate, create, or synthesize signals (step, ramp, sine, chirp, pulse, noise) to populate a Dataset for External Inputs or Signal Editor. Covers timeseries and timetable formats with correct data type, interpolation, units, and dimensions. Also covers function-call and trigger inport timing setup. Do NOT use when the user wants to load, import, or read existing data from files (MAT, CSV, spreadsheet) — even if that data will be used as model input. Do NOT use for running simulations or plotting outputs.

Overview

Publishermatlab
Repositorysimulink-agentic-toolkit
Skill nameauthoring-simulink-inputs
Stars
1.2K
Forks
112
Bundled files
3
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by matlab on GitHub. Read the source before you install it.

Installation

Install the Authoring Simulink Inputs AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog/simulink-simulation/authoring-simulink-inputs
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/matlab/simulink-agentic-toolkit.git /tmp/simulink-agentic-toolkit
mkdir -p .claude/skills
cp -r /tmp/simulink-agentic-toolkit/skills-catalog/simulink-simulation/authoring-simulink-inputs .claude/skills/authoring-simulink-inputs
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Authoring Simulink Inputs in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Authoring Simulink Inputs on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Authoring Simulink Inputs is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Author Input Signals

Create populated input signal datasets for Simulink models using createInputDataset as the scaffold, then populating with meaningful waveforms while preserving all signal metadata.

When to Use

  • User asks to generate or create synthetic waveforms (step, ramp, sine, chirp, pulse, noise, constant) for a model's inports
  • User wants to populate a Dataset created by createInputDataset with meaningful signal data
  • User needs signals for Signal Editor scenarios
  • User describes desired input signal behavior in natural language (e.g., "ramp from 0 to 10", "sine at 5 Hz")
  • User wants timetable-based input signals for inports
  • User needs to set up function-call timing or configure trigger/enable inport signals
  • User wants to replace zero-filled scaffold data with realistic waveforms

When NOT to Use

  • User wants to simulate the model, run it, or plot outputs — use simulating-simulink-models instead. This skill only creates input data; it never runs sim() or produces plots.
  • User wants to load, import, or read data from existing files (CSV, MAT, spreadsheet, .mat workspace) — even if the destination is a model inport. This skill generates new synthetic waveforms from scratch; it does not read or convert existing recorded/measured data.

Output

This skill produces:

  1. MATLAB code — a local function that generates and returns the Dataset (reproducible, editable, keeps workspace clean)
  2. Dataset variable (ds) — populated Simulink.SimulationData.Dataset in the base workspace, ready for simulation
  3. Summary — brief description of each element: name, data type, waveform shape, and value range

To simulate with the Dataset, follow the simulating-simulink-models skill workflow (SimulationInput → setExternalInput → sim).

Must-Follow Rules

  1. Start from createInputDataset — call it exactly once — never build a Dataset from scratch. Call createInputDataset once per model (it triggers update diagram). For multiple datasets, clone the returned scaffold in a loop rather than calling createInputDataset again
  2. Preserve metadata from scaffold — every new timeseries must copy origEl.DataInfo.Interpolation and origEl.DataInfo.Units. For timetables, copy origEl.Properties.VariableContinuity. Omitting these is a bug
  3. Replace elements in place — for timeseries: ds{k} = ts. For timetable: ds = ds.setElement(k, tt, origEl.Properties.Description) — never use addElement
  4. Respect data types — use cast(data, 'like', origEl.Data) to match any scaffold type (double, single, integer, fixed-point). For boolean inports use true(size(t)) directly
  5. Set interpolation correctly — continuous signals (sine, ramp, chirp) use linear; discrete signals (step, pulse, boolean, integer, noise) use zero-order hold. The scaffold's interpolation reflects the inport's Interpolate property — preserve it unless the signal nature demands otherwise
  6. Wrap all generation logic in a function — the only variables left in the base workspace should be the Dataset (and simIn/simOut if simulating). All intermediate variables (t, dt, origEl, ts, signalData, k) must stay inside function scope
  7. Never destroy user data — never call clear, clearvars, clear all, or bdclose all. The user may have existing variables, models, or figures open. Only add to the workspace, never remove from it

Workflow

Determine your entry point. Do not always start at step 1. Assess what the user already has:

User's current stateStart at
No existing Dataset or script — starting freshStep 1
Has a Dataset variable but it's empty/scaffold (all zeros or placeholder data)Step 2
Has a Dataset with some signals populated but needs fixes (wrong shape, dtype, interpolation)Step 2 — inspect the broken element, fix in place
Has a working script but wants additional scenarios or signals addedStep 2 or "Creating Multiple Datasets"
Has a complete Dataset but simulation failsDiagnose the error first — often a metadata mismatch (interpolation, dtype, units) fixable in Step 2

A scaffold is the Dataset returned by createInputDataset. It contains one element per inport, pre-filled with correct metadata (data type, interpolation method, units, signal dimensions) but only placeholder time samples (typically 2 zero-valued rows). The workflow replaces this placeholder data with meaningful waveforms while preserving the metadata.

1. Create the scaffold (inside a function)

All generation code lives in a local function. The caller invokes the function and receives the populated Dataset:

matlab
ds = buildInputs('modelName');

function ds = buildInputs(mdl)
    ds = createInputDataset(mdl);
    % — or timetable format —
    % ds = createInputDataset(mdl, 'DatasetSignalFormat', 'timetable');

    stopTime = str2double(get_param(mdl, 'StopTime'));
    dt = 0.01;
    t = (0:dt:stopTime)';

    % ... populate elements (Step 2) ...
end

If createInputDataset fails (model cannot compile), use model_read to inspect the model's inport blocks and ask the user for any type/dimension info that cannot be determined from the model structure.

2. Populate each element (inside the same function)

Replace placeholder scaffold data with meaningful signal waveforms while preserving metadata. For each element:

  1. Extract the original element (origEl = ds{k})
  2. Generate your waveform and cast via cast(data, 'like', origEl.Data) — works for all types including fixed-point
  3. Create the new timeseries or timetable
  4. Copy DataInfo.Interpolation and DataInfo.Units from origEl (timeseries) or VariableContinuity from origEl (timetable)
  5. Replace in place: ds{k} = ts (timeseries) or ds = ds.setElement(k, tt, origEl.Properties.Description) (timetable)

See references/signal-patterns.md — "Dataset Assembly" sections — for the complete code patterns.

Creating Multiple Datasets

Call createInputDataset once, then clone the scaffold in a loop inside a function. See references/dataset-patterns.md — "Creating Multiple Datasets" section — for the complete pattern.

Bus Signal Inports

If the model has bus signal inports, see the "Bus Signal Inports" section in references/dataset-patterns.md.

Function-Call Inports

If the model has function-call inports, see the "Function-Call Inports" section in references/dataset-patterns.md.

Signal Types

See references/signal-patterns.md for waveform generation code (sine, step, ramp, chirp, pulse, noise, constant, enum).

Interpolation and Continuity (explicit set — use only when overriding scaffold)

Signal naturetimeseriestimetable
Continuous (sine, ramp, chirp)tsdata.interpolation('linear')"continuous"
Discrete (step, pulse, boolean)tsdata.interpolation('zoh')"step"

Guardrails

MistakeWhy It's WrongCorrect Approach
Using ones(size(t)) for boolean enableCreates double; simulation fails with type mismatchUse true(size(t))
Ignoring struct fields in bus scaffoldMissing or incorrectly typed bus element causes simulation errorPopulate every field in the struct, preserving each field's metadata
Treating scaffold data rows as signal widthScaffold [2 1] data means 2 time samples of a scalar, not a 2-element vectorUse size(origEl.Data, 2) for signal width — rows are placeholder time samples
Enum data fails with "turn off interpolation"Simulink requires Interpolate='off' on inport blocks receiving enum data — even with zoh set on the timeseriesThis is a model fix, not a data fix. Use simIn.setBlockParameter(portPath, 'Interpolate', 'off') before simulating

Copyright 2026 The MathWorks, Inc.


Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Authoring Simulink Inputs AI skill do?

Synthesize new waveforms from scratch for Simulink inports using createInputDataset. Use ONLY when the user asks to generate, create, or synthesize signals (step, ramp, sine, chirp, pulse, noise) to populate a Dataset for External Inputs or Signal Editor. Covers timeseries and timetable formats with correct data type, interpolation, units, and dimensions. Also covers function-call and trigger inport timing setup. Do NOT use when the user wants to load, import, or read existing data from files (MAT, CSV, spreadsheet) — even if that data will be used as model input. Do NOT use for running sim...

Why use Authoring Simulink Inputs on TypingMind?

Because you install it once and use it with any model. Authoring Simulink Inputs is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Authoring Simulink Inputs in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog/simulink-simulation/authoring-simulink-inputs. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Authoring Simulink Inputs?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Authoring Simulink Inputs?

As many as you like. As long as a model supports skills, you can use Authoring Simulink Inputs with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Authoring Simulink Inputs AI skill free?

It is published on GitHub by matlab. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇