주요 콘텐츠

simulateSystem

R2026b

Simulate system specified by converter object

Description

simOut = simulateSystem(converter) simulates the system specified by the DataTypeWorkflow.Converter object converter.

The simulateSystem function is similar to the sim command, except that simulateSystem preserves the model-wide data type override and instrumentation settings of each run.

example

simOut = simulateSystem(converter,Name=Value) specifies options using one or more name-value arguments. This function accepts the same name-value arguments as the sim function.

simOut = simulateSystem(converter,simIn) simulates the system using the inputs specified in the Simulink.SimulationInput object simIn.

simOut = simulateSystem(converter,ParameterStruct) simulates the system using the parameter values specified in the structure ParameterStruct.

simOut = simulateSystem(converter,ConfigSet) simulates the system using the configuration settings specified in the model configuration set ConfigSet.

Examples

collapse all

This example shows how to use the simulateSystem function to simulate the system specified by the DataTypeWorkflow.Converter object.

Suppose for the fxpdemo_feedback model, you create a DataTypeWorkflow.Converter object for the Controller subsystem, then simulate this system.

converter = DataTypeWorkflow.Converter('fxpdemo_feedback/Controller');
simulateSystem(converter);

Input Arguments

collapse all

Converter object for the system under design, specified as a DataTypeWorkflow.Converter object.

Simulation input for the system, specified as a Simulink.SimulationInput object or an array of Simulink.SimulationInput objects.

When you use a SimulationInput object as an input to the simulateSystem function, you can also specify these name-value arguments:

ParameterValues
ShowSimulationManager

  • 'on' - Opens the Simulation Manager.

  • 'off' (default) - Does not open the Simulation Manager.

ShowProgress

  • 'on' - View the progress of the simulation in the command window.

  • 'off' (default) - The progress of the simulation does not display in the command window.

Names of the configuration parameters for the simulation, specified as a structure. The corresponding values are the parameter values.

Data Types: struct

Configuration set, specified as a Simulink.ConfigSet object that contains the values of the model parameters.

Output Arguments

collapse all

Simulation output, returned as a Simulink.SimulationOutput object. The returned object includes these simulation outputs: logged time, states, and signals.

Limitations

  • The SimulationMode property must be set to normal. The Fixed-Point Designer™ software does collect simulation ranges in accelerator or rapid-accelerator modes.

  • The StopTime property cannot be set to inf.

  • The SrcWorkspace (not recommended) parameter must be set to either base or current.

Tips

  • To name your simulation run, before simulation, change the CurrentRunName property of the DataTypeWorkflow.Converter object.

Version History

Introduced in R2014b