This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Generate MATLAB Scripts for Simulation with Scenarios

After associating a scenario with the model, you can generate a MATLAB® script to perform batch simulations. These scripts enable you to connect multiple sets of input signals to your Simulink® model for interactive or batch simulation. You can run simulations multiple times and quickly generate data. This topic assumes that you have a scenario ready to run (see Root Inport Mapping Scenarios).

  1. Associate your scenario with the model.

  2. In the SCRIPT section, click Generate MATLAB Script and supply a script name when prompted.

  3. To run the script, click Run Script.

  4. To evaluate the results of the simulation, see the base workspace.

The resulting script uses the Simulink.SimulationInput object and parsim function.

See Also


Related Topics