Load Data to Root-Level Input Ports

You can load data from a workspace and to a root-level inport.

  • Inport block

  • Enable block

  • Trigger block that has an edge-based (rising, falling, or either) trigger type

These blocks import data from the workspace based on the value of the Configuration Parameters > Data Import/Export > Input parameter.

    Tip   To import many signals to root-level input ports, consider using the Root Inport Mapping tool. For more information, see Map Root Inport Signal Data.

You can also import data from a workspace using a From Workspace block. For details, see the From Workspace documentation and Import Data for an Input Test Case.

Loading the Data

Use the Configuration Parameters > Data Import/Export > Input parameter to load data from a workspace and apply it to the root-level input ports of a model during a simulation run.

    Note:   The use of the Input box is independent of the setting of the Format list on the Data Import/Export pane.

Simulink® linearly interpolates or extrapolates input values as necessary if you select the Interpolate data option for the corresponding Inport, Enable, or Trigger block.

Simulink resolves symbols used in the external input specification as described in Symbol Resolution. See the documentation of the sim command for some data import capabilities that are available only for programmatic simulation.

See Also



Related Examples

More About

Was this topic helpful?