Documentation

Load Signal Data for Simulation

Configure input signals to model

You can use several different approaches to load data into a model inputs. To determine which approach to use, see Comparison of Signal Loading Techniques.

Blocks

Inport Create input port for subsystem or external input
Enable Add enabling port to system
Trigger Add trigger port to model or subsystem
From File Load data from MAT-file
From Spreadsheet Read data from spreadsheet
From Workspace Load signal data from workspace
Signal Builder Create and generate interchangeable groups of signals whose waveforms are piecewise linear
Constant Generate constant value
Enumerated Constant Generate enumerated constant value
Chirp Signal Generate sine wave with increasing frequency
Pulse Generator Generate square wave pulses at regular intervals
Signal Generator Generate various waveforms
Sine Wave Generate sine wave, using simulation time as time source
Step Generate step function
Band-Limited White Noise Introduce white noise into continuous system
Clock Display and provide simulation time
Counter Free-Running Count up and overflow back to zero after reaching maximum value for specified number of bits
Counter Limited Count up and wrap back to zero after outputting specified upper limit
Digital Clock Output simulation time at specified sampling interval
Counter Limited Count up and wrap back to zero after outputting specified upper limit
Ground Ground unconnected input port
Ramp Generate constantly increasing or decreasing signal
Random Number Generate normally distributed random numbers
Uniform Random Number Generate uniformly distributed random numbers
Repeating Sequence Generate arbitrarily shaped periodic signal
Repeating Sequence Interpolated Output discrete-time sequence and repeat, interpolating between data points
Repeating Sequence Stair Output and repeat discrete time sequence
Waveform Generator Output waveforms using signal notations

Functions

getRootInportMap Create custom object to map signals to root-level inports
convertToSlDataset Convert contents of MAT-file to Simulink.SimulationData.Dataset object
getSlRootInportMap Create custom object to map signals to root-level inports using Simulink mapping mode
signalbuilder Create and access Signal Builder blocks
getInputString Create comma-separated list of variables to map
Simulink.BlockDiagram.getInitialState Return initial state structure of block diagram
Simulink.Bus.createMATLABStruct Create MATLAB structures using same hierarchy and attributes as bus signals
Simulink.SimulationData.createStructOfTimeseries Create a structure with MATLAB timeseries object leaf nodes

Simulink Configuration Parameters

Was this topic helpful?