Main Content


View the contents of the Simulink.SimulationInput object



showContents(in) displays the contents of the Simulink.SimulationInput object as a table. The method, showContents, 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

This example shows the contents of the Simulink.SimulationInput object by using the showContents method on the object.

Open and Load Model

Open and load the model .


Create a SimulationInput Object for a Model

Create a Simulink.SimulationInput object for the model ex_sldemo_househeat.

in = Simulink.SimulationInput('ex_sldemo_househeat');

Set a Variable and Model Parameters on the Model

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

View the Contents of the Simulink.SimulationInput Object, in

    ModelName: 'ex_sldemo_househeat'

    Index    Name     Value
    _____    _____    _____

      1      Start    '0'  
      2      Stop     '50' 

    Index    Name    Value       Workspace    
    _____    ____    _____    ________________

      1      cost     50      global-workspace

    RuntimeFcns: 1x1 RuntimeFcns

Input Arguments

collapse all

A Simulink.SimulationInput object that is used to specify changes to the model for a simulation.

Version History

Introduced in R2020a