authoring-simulink-inputs

Generate synthetic input waveforms for Simulink model inports using createInputDataset.

1.0k|98|Updated Apr 15, 2026
One-click install
npx skills add https://github.com/matlab/simulink-agentic-toolkit --skill authoring-simulink-inputs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: authoring-simulink-inputs
Source: https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog/simulink-simulation/authoring-simulink-inputs
Command: npx skills add https://github.com/matlab/simulink-agentic-toolkit --skill authoring-simulink-inputs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Simulink models need realistic input signals for simulation, but manually constructing Dataset objects with correct data types, interpolation, units, and dimensions for every inport is error-prone and tedious. This Skill generates synthetic waveforms (step, ramp, sine, chirp, pulse, noise) that populate a Dataset scaffold while preserving all signal metadata.

Core Features & Use Cases

  • Scaffold-Based Generation: Calls createInputDataset once to obtain a metadata-correct Dataset, then replaces placeholder data with meaningful waveforms in timeseries or timetable format.
  • Full Signal Catalog: Provides MATLAB code patterns for constant, step, ramp, sine, chirp, pulse, noise, sawtooth, triangle, exponential decay, and composite piecewise or superimposed signals.
  • Advanced Inport Handling: Covers bus signal inports (struct population), function-call inports (call-time vectors aligned to solver step size), and multi-dimensional signals.
  • Use Case: A user asks to create a throttle sweep test for an engine model. The Skill generates a function that builds the Dataset scaffold, populates the throttle inport with a clamped ramp, preserves interpolation and units, and returns a ready-to-simulate Dataset.

Quick Start

Ask your AI agent to generate a sine wave at 5 Hz and a step input for the inports of your Simulink model and produce a Dataset ready for simulation.

Frequently Asked Questions about authoring-simulink-inputs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create input signals for Simulink inports in MATLAB?

Call createInputDataset on your model to get a Dataset scaffold with correct metadata, then replace each element's placeholder data with generated waveforms like sine, ramp, or step. Preserve the original interpolation and units from the scaffold when building each timeseries or timetable.

How do I generate a sine or chirp signal for Simulink simulation?

Build a time vector from the model's stop time, compute the waveform (for example amplitude * sin(2*pi*frequency*t)), cast it to match the scaffold element's data type, and wrap it in a timeseries. Chirp signals use a linear frequency sweep formula with phase integration.

Can I use this approach to load CSV or MAT file data into Simulink inports?

No. This Skill only synthesizes new waveforms from scratch; it does not read, import, or convert existing data from CSV, MAT, or spreadsheet files. Use a data import workflow instead when your input data already exists in files.

Why does my Simulink simulation fail with enum input data?

Simulink requires Interpolate set to off on inport blocks receiving enum data, even when the timeseries uses zero-order hold. Fix the model with setBlockParameter on the port before simulating; it is a model setting, not a data problem.

How do I set up function-call inport timing in Simulink?

Function-call inports take a column vector of call times rather than a timeseries. Times must be non-negative and monotonically non-decreasing, and for fixed-step solvers they must be integer multiples of the fixed step size.

What MATLAB version is required for createInputDataset signal generation?

This Skill requires MATLAB R2023a or later with Simulink installed. It also relies on the evaluate_matlab_code and model_read tools from the MATLAB MCP Server to execute code and inspect model inports.