A Simulink.ConfigSet object stores a set of model configuration parameter values. You can specify a Simulink.ConfigSet object as an input to the sim function. The configuration set from the object is applied to the model for the simulation. After simulation, the original configuration set is restored in the model.
A Simulink.Configset object stores only model configuration parameter values. To specify model configuration parameter values, block parameter values, and variable values for a simulation in a single input, use a Simulink.SimulationInput object instead.
Open the model IntegrateSine. The model uses an Integrator block to integrate the output of a Sine Wave block. The output from the Integrator block is connected to an Outport block.
Use the getActiveConfigSet function to get a Simulink.ConfigSet object for the current model configuration.
Use the copy function to create a copy of the Simulink.ConfigSet object to modify.
Modify the Simulink.ConfigSet object simConfig to use the solver ode45 and a stop time of 20 seconds.
Simulate the model using the configuration parameters in the Simulink.Configset object simConfig.
The model simulates through a simulation time of 20 seconds using the ode45 solver.