Main Content

simulink.multisim.ExternalInput

Specify a range of external inputs

Since R2024a

Description

The simulink.multisim.DesignStudy object represents a design study that allows you to run multiple simulations at a large scale. With the simulink.multisim.ExternalInput object, you can specify external input values for massive simulations using parameter combinations.

Creation

Description

extIn = simulink.multisim.ExternalInput(indata) specifies the external input data indata on the simulink.multisim.ExternalInput object extIn. Specifying external input data on a simulink.multisimExternalInput object is equivalent to configuring the Input parameter in simulations you run using the object. The model is modified during initialization to load the external input data you specify, and the modifications revert when the simulation completes.

Input Arguments

expand all

External input data for top-level input ports, specified using a format supported by the Input parameter.

When your model contains multiple top-level input ports, specify the data for all input ports using a single variable that contains the data for all top-level input ports. When you specify the external input data to load as a variable, the setExternalInput function adds the variable and the data it contains to the SimulationInput or Simulation object.

You can use several formats to store the input data for all top-level input ports in a single variable, including:

The software maps the signal data in the variable to each top-level input port based on the order of the signal data within the variable and the port number. For example, the first element in a Dataset object maps to the top-level input port with a port number of 1.

You can format the data for each top-level input port to load using several formats, including:

  • timeseries

  • timetable that contains one column with data for a single signal

For complete information about supported formats, see Input.

Example: extIn = simulink.multisim.ExternalInput(indata) adds the external input data indata to the object extIn.

Output Arguments

expand all

Specified external inputs with values for simulation, returned as a simulink.multisim.ExternalInput object.

Properties

expand all

External input values for top-level input ports, specified using a format supported by the Input parameter.

Function handle to process the specified values that run on parallel workers, specified as a function handle or function name. The ProcessingFcn property allows you to perform additional processing on the variable values before the simulation. You can use the ProcessingFcn property to transform the values assigned to the simulink.multisim.Variable object per your requirements. For example, you can use the function to transform a string values of a variable to a timeseries value.

Version History

Introduced in R2024a