Logo: Authoring Simulink Inputs

Authoring Simulink Inputs

OrganisatiounBeléift
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.

Iwwersiicht

Editeurmatlab
Repositorysimulink-agentic-toolkit
Skill-Nummauthoring-simulink-inputs
Stären
1.2K
Forks
112
Matgeliwwert Dateien
3
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 3 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    matlab huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Authoring Simulink Inputs an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog/simulink-simulation/authoring-simulink-inputs
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

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
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Authoring Simulink Inputs an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Authoring Simulink Inputs automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Authoring Simulink Inputs net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

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.


Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill 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 sim...

Firwat Authoring Simulink Inputs op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Authoring Simulink Inputs besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Authoring Simulink Inputs an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog/simulink-simulation/authoring-simulink-inputs an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Authoring Simulink Inputs benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Authoring Simulink Inputs benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Authoring Simulink Inputs domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Authoring Simulink Inputs gratis?

matlab huet de Skill op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇