Main Content


View summary of specification in SimulationInput or Simulation object

Since R2020a



showContents(s) displays a table that summarizes the simulation specification stored in the Simulink.SimulationInput or Simulation object s.


collapse all

Use the showContents function to view the simulation configuration stored in a Simulink.SimulationInput object.

Open the model .


Create a Simulink.SimulationInput object for the model ex_sldemo_househeat.

simIn = Simulink.SimulationInput('ex_sldemo_househeat');

Configure a variable value and model parameter values on the Simulink.SimulationInput object.

simIn = setVariable(simIn,'cost',50);
simIn = setModelParameter(simIn,'Start','0','Stop','50');

View the configuration stored on the Simulink.SimulationInput object.

    ModelName: 'ex_sldemo_househeat'

    Index    Name     Value
    _____    _____    _____

      1      Start    '0'  
      2      Stop     '50' 

    Index    Name    Value       Workspace          Context  
    _____    ____    _____    ________________    ___________

      1      cost     50      global-workspace    <undefined>

Input Arguments

collapse all

Simulation specification or simulation, specified as a Simulink.SimulationInput object or a Simulation object.

A SimulationInput object represents a simulation specification that includes the initial state, external inputs, model parameter values, block parameter values, and variable values to use in the simulation.

The Simulation object represents a simulation and provides an interface for controlling and interacting with the simulation.

Version History

Introduced in R2020a

expand all