Main Content


View contents of Simulink.SimulationInput object

Since R2020a



showContents(simIn) displays the contents of the Simulink.SimulationInput object simIn as a table. The function lets you view all the information such as block parameters, variables, model parameters, external Inputs and the initial states that are set in the Simulink.SimulationInput object. You can view the contents of a single Simulink.SimulationInput object at a given time.


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>

    RuntimeFcns: 1x1 RuntimeFcns

Input Arguments

collapse all

Simulation inputs and configuration, specified as a Simulink.SimulationInput object.

Version History

Introduced in R2020a