%SIMULINK.SIMULATIONINPUT object is used to specify changes to a model for
%a simulation
%   IN = Simulink.SimulationInput('MODEL') creates a SimulationInput
%   object which can be used to specify changes to a model for a simulation.
%   The specified changes are applied temporarily to the model during
%   simulation and the model is restored back to the state it was before
%   the simulation, if possible. These changes include:
%       1. <a href="matlab: help('Simulink.SimulationInput/InitialState')">InitialState</a>
%       2. <a href="matlab: help('Simulink.SimulationInput/ExternalInput')">ExternalInput</a>
%       3. <a href="matlab: help('Simulink.SimulationInput/ModelParameters')">ModelParameters</a>
%       4. <a href="matlab: help('Simulink.SimulationInput/BlockParameters')">BlockParameters</a>
%       5. <a href="matlab: help('Simulink.SimulationInput/Variables')">Variables</a>
%   You can also specify MATLAB functions to run before and after the
%   simulation using the <a href="matlab:help('Simulink.SimulationInput/PreSimFcn')">PreSimFcn</a> and <a href="matlab:
%   help('Simulink.SimulationInput/PostSimFcn')">PostSimFcn</a>, respectively.
%   The <a href="matlab: help('Simulink.SimulationInput/UserString')">UserString</a> property can be used to add a brief description about
%   the simulation.
%
%   Usage:
%   Example 1:
%   In this example, a SimulationInput object is created for the model
%   'vdp'. The object is then used to specify a different value for 'Gain'
%   in the block 'vdp/Mu'. The model argument 'SaveOutput' is set to 'on'
%   to log outputs. Note that specifying these changes in the
%   SimulationInput object does not dirty the model. The simulation can be
%   run by passing the SimulationInput object to the sim command. The
%   results are returned in a Simulink.SimulationOutput object.
%       >> in = Simulink.SimulationInput('vdp');
%       >> in = setBlockParameter(in, 'vdp/Mu', 'Gain', '2');
%       >> in = setModelParameter(in, 'SaveOutput', 'on');
%       >> in.UserString = 'run 1'; % optional description
%       >> out = sim(in);
%
%   Example 2:
%   Multiple simulations can be run using an array of SimulationInput
%   objects. Passing an array of SimulationInput objects as an argument to
%   the sim command runs the simulations in serial. Use the parsim command
%   to run the simulations in parallel (requires Parallel Computing Toolbox).
%   An array of Simulink.SimulationOutput objects is returned.
%       >> for i = 10:-1:1
%       >>    in(i) = Simulink.SimulationInput('vdp');
%       >>    in(i) = setBlockParameter(in(i), 'vdp/Mu', 'Gain', num2str(i));
%       >>    in(i) = setModelParameter(in(i), 'SaveOutput', 'on');
%       >> end
%       >> out = sim(in); % Run multiple simulations in serial
%   See also SIM, PARSIM, SIMULINK.SIMULATIONOUTPUT

 
%   Copyright 2015-2023 The MathWorks, Inc.

