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.
In the model window, from the top menu bar, select Simulation > Model Configuration Parameters. The Configuration Parameters dialog box opens.
In the Configuration Parameters dialog box, in the
left pane, select Simscape. The right pane displays
the Log simulation data option, which is set
None, by default.
From the drop-down list, select
then click OK.
Simulate the model. This creates a workspace variable
simlog (as specified by the Workspace
variable name parameter), which contains the simulation
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.