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.

Enable Data Logging for the Whole Model

Using data logging is a best practice for Simscape™ models because it provides access to important simulation and analysis tools. Therefore, when you create a model by using the ssc_new function or any of the Simscape model templates, data logging for the whole model is turned on automatically.

However, for models created using other methods, simulation data is not logged by default. To turn on the data logging for a model, use the Log simulation data configuration parameter.

  1. In the model window, from the top menu bar, select Simulation > Model Configuration Parameters. The Configuration Parameters dialog box opens.

  2. In the Configuration Parameters dialog box, in the left pane, select Simscape. The right pane displays the Log simulation data option, which is set to None, by default.

  3. From the drop-down list, select All, then click OK.

  4. Simulate the model. This creates a workspace variable named simlog (as specified by the Workspace variable name parameter), which contains the simulation data.

    For information on how to access and use the data stored in this variable, see the related examples listed below. For information on additional data logging configuration options, see Data Logging Options.

Related Examples

More About