Load Signal Data for Simulation

Load signal data for simulating a model

You can use several different approaches to load data into a model, including:

Root-level input ports — Import signal data from a workspace, using the
Input configuration parameter to import it to a root-level input port of a
Inport, Enable, or Trigger block. To import many
signals to root-level input ports, consider using the Root Inport Mapper tool.

From
File block — Read data from a MAT-file, outputting the data as a signal.

From
Spreadsheet block — Read data from Microsoft® Excel® spreadsheets or CSV
spreadsheets, outputting the data as one or more signals.

Source blocks — Add a source block, such Sine Wave block, to generate
signals to input to another block.

You can create input signal data in a file, workspace variable, or model parameter. You can use data
logged in a previous simulation, from another source, or create the data yourself. To determine which
signal loading approach to use, see Comparison of Signal Loading Techniques.

Load signal data that uses units from data logged in a previous simulation. Signal
logging, the To File block, and the To Workspace block can include units information for
Dataset or Timeseries logging formats.

Test a discrete algorithm by importing discrete signals, which are signals that you
define using evenly spaced time values. One signal value is read at each time step, using
the sample time of the source block.