Main Content


Option to load external input data for simulation using top-level input ports

Model Configuration Pane: Data Import/Export


The software loads the specified input data from a workspace for simulation. When you simulate a model hierarchy, only input ports in the top model load data from the workspace. The Input parameter value for referenced models is ignored except when you simulate a referenced model as a top model. To load data into a referenced model that is not simulated as a top model, use another block, such as the From Workspace block.

For more information, see Load Data to Root-Level Input Ports.

You can also stream input data from a file using a object or a Simulink.SimulationData.DatasetRef object. For more information, see Load Big Data for Simulations.


off (default) | on

By default, the Input parameter is disabled. Leave this parameter disabled when your model does not contain top-level input ports.


When your model contains top-level input ports, select the Input parameter to specify input data for the simulation. In the text box, specify the external input data to load as a MATLAB® expression, such as the name of a variable in the workspace.

The Input parameter does not include data dictionaries when resolving the expression you specify. When a model uses a data dictionary and you disable access to the base workspace, the Input parameter still accesses simulation input data in the base workspace. For more information about how the software resolves symbols in the expression, see Symbol Resolution.


  • You can use the Root Inport Mapper to facilitate mapping input data to top-level input ports in models with several top-level Inport or In Bus Element blocks. To open the Root Inport Mapper, click Connect Inputs.

  • Inport blocks in the top model interpolate and extrapolate input data values according to block parameter values.

  • In Bus Element blocks in the top model always linearly interpolate and extrapolate input data values.

Recommended Settings

The table summarizes recommended values for this parameter based on considerations related to code generation.

DebuggingNo impact
TraceabilityNo impact
EfficiencyNo recommendation
Safety precautionNo recommendation

Programmatic Use

Parameter: LoadExternalInput
Value: 'on' | 'off'
Default: 'off'
Parameter: ExternalInput
Type: string | character vector
Value: valid MATLAB expression
Default: '[t,u]'

Version History

Introduced before R2006a