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, open the Modeling tab and click Model Settings. 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